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



What is the error message that you would get if you try to assign "Null" to an integer v..

Answer / lokesh

Invalid Use of NULL

Is This Answer Correct ?    4 Yes 0 No

What is the error message that you would get if you try to assign "Null" to an integer v..

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

What is the error message that you would get if you try to assign "Null" to an integer v..

Answer / bhanu reddy

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

What is the error message that you would get if you try to assign "Null" to an integer v..

Answer / manikandan

when we not giving any integer variable. that only it will
be coming null

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Visual Basic Interview Questions

What is the use of Hyperlink control for DHTML applications?

0 Answers  


what are the Types of Modal windows in VB?

1 Answers  


How to check the condition in Msgbox?

3 Answers  


What is view Port?

1 Answers  


Explain the usage of Web Browser Control?

0 Answers  


How would you add column headers in listview control?

1 Answers   Infosys,


what is a property to resize a label control according to your caption?

2 Answers  


What is the maximum size of form to hold the controls?

3 Answers   Tech Mahindra,


Which language is used in visual basic?

0 Answers  


List out the ADO objects?

2 Answers  


How do I add a form in visual basic?

0 Answers  


How will you retain the values of existing elements in a dynamic array when you want to alter the array size?

1 Answers  


Categories