What is the error message that you would get if you try to
assign "Null" to an integer variable?
Answers were Sorted based on User's Feedback
Answer / govind. konduri
hai...
when we will try to assign a null value to integer as
shown below.
int a=null;//error
console.WriteLine(a);
when compile the above code it will show the error message.
"cannot convert null to int because it is a non-nullable
value type"
so...if we want to assign 'null' to 'int' .we have to write
like this..
int? a=null;//valid
Is This Answer Correct ? | 3 Yes | 0 No |
when u assign a null value to int varible
like
int i=null;
we will get error message :
Cannot convert null to 'int' because it is a non-nullable
value type
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / manikandan
when we not giving any integer variable. that only it will
be coming null
Is This Answer Correct ? | 0 Yes | 2 No |
What is the use of Hyperlink control for DHTML applications?
what are the Types of Modal windows in VB?
How to check the condition in Msgbox?
What is view Port?
Explain the usage of Web Browser Control?
How would you add column headers in listview control?
what is a property to resize a label control according to your caption?
What is the maximum size of form to hold the controls?
Which language is used in visual basic?
List out the ADO objects?
How do I add a form in visual basic?
How will you retain the values of existing elements in a dynamic array when you want to alter the array size?