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...

will this code works fine? or will it gives error?

Object obj=5;
int i=6;
i=i+obj;

Answer Posted / amre binnaz

Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click

Dim obj As Object
Dim i As Int16
obj = 5
i = 6
i = i + obj
MsgBox(i)


End Sub
its working fine the result shows 11
private void button1_Click(object sender, EventArgs e)
{
object obj;
obj = 5;
int i;
i =6;
i = i + Convert.ToInt16(obj);
MessageBox.Show(i.ToString());
}
when you convert the object to int then only working fine
and show result 11

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ado.net data provider? : Entity framework

1106


How OS come to know whether to load the .net framework when we run an .exe created using .Net framework?

1069


Does .NET Framework support SAX?

1064


What is object service? : Entity framework

1229


Explain RenderBody and RenderPage in ASP.Net MVC?

1209


How does work clr?

965


differences between poco, model first and data first approach?

1291


what is client wins and store wins mode in entity framework concurrency?

1275


What is the difference between viewbag and viewdata in mvc?

1015


List out few different return types of a controller action method?

1095


i have done enough testing in life but now stated developing intereset in development work,Can i think of entering into development work that too in >Net after more then 4 years of testing experiece?

2261


Can you please explain the request flow in ASP.NET MVC framework?

1176


What is ViewStart Page in ASP.Net MVC?

1097


What is oauth in web api?

1079


What is the difference between windows vista and .net framework 3.0 ?

1052