?? Operator in .NET
This operator is used to check whether the string is null or not.If is it null values we can set a Default value in it.
Example:
string a;//The default value of a is null
Page Load
{
a=a?? "Hi";
Response.write(a);
}
output: Hi // we set the default value of a is null
No comments:
Post a Comment