TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Check Nullable Type Equality Operators In C#
Rajan Singh
Jun 24
2015
Code
1.2
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
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