Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to Check Nullable Type Equality Operators In C#
WhatsApp
Rajan Singh
Jun 24
2015
1.3
k
0
0
using
System.IO;
using
System;
class
NullableType
{
static
void
Main(
string
[] args)
{
int
? i1 =
null
, i2 =
null
;
// Both are null.
if
(i1 == i2) {
// Operator returns true.
Console.WriteLine(
"Both Nullable Type Variables are Equal"
);
}
}
}
Output:
Both Nullable Type Variables are Equal
Up Next
How to Check Nullable Type Equality Operators In C#