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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how a multiple routing works ?

2299


What is vbs file?

557


____ is the difference between Listindex and Tab index.

1303


what are the Differences between Recordset and Resultsets?

2000


How to find size of the file. Which method or function is used to occomplish this?

1492






What are the tools available for Debuggiu in VB?

1480


What is meant by Establish Connection in RDO?

1833


What is the use of ActiveX Documents?

1575


How do I get my application on top?

932


Can you create a updatecascade, Deletecascade relation in Ms- Access? If no, give on eample.

1072


Explain the usage of Web Browser Control?

1622


To validate a range of values for a property whenever the property values changes,which type of property procedure you use?

1431


Discuss the working with to-do lists.

575


To find the current recordposition in data control.

1159


How to control the file?

609