When we declaring a int variable the value of that variable become 0.
Example
int a;
The value of a is zero.To assign null value we can use below code
Int? a=null;
Nullable<int>a=null;
It tells us how to pass null value to int variable.
When we declaring a int variable the value of that variable become 0.
Example
int a;
The value of a is zero.To assign null value we can use below code
Int? a=null;
Nullable<int>a=null;
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyeBook · C#Modern CSharp Mastery - Advanced Guide for Experienced DevelopersDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Join the conversation! Your thoughts help the community grow.