Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 do I make my applications screen-resolution independent?

1508


Difference between ActiveX Exe and Dll.

1947


___ argument can be used to make a menuitem into bold.

1838


Explain about ADO control?

1014


Why visual basic is used?

1021


How do I make a text box not beep but do something else when I hit the Enter key?

1544


How do I call a DLL?

1508


Explain the differences between ActiveX Dll and ActiveX Exe?

2534


What is the use of debug Window?

2053


Which method is used to write context Into file?

2044


OLE is used for _______

1616


What is the use of Imagelist Controls ?

2122


Draw Sequence Modal of RDO and Explain?

2353


How do I speed up control property access?

1478


When/Why should I use Option Explicit?

1496