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 eager loading?

1020


What is objectset? : Entity framework

1026


What are actions in mvc?

1009


How to update one of my table in database at 4pm every day how it is possible?

1036


Explain the advantages of asp.net mvc over asp.net?

1124


Explain the methods used to render the views in ASP.Net MVC?

1116


My organization went through the approval process of supporting the .net framework 2.0 in production. Do we need to go through the same process all over again for the .net framework 3.0? Do I need to do any application compatibility testing for my .net framework 2.0 applications?

1003


Is it possible to unit test an mvc application without running the controllers in an asp.net process?

1132


Explain what languages does the .net framework support?

979


Is it possible to share a view across multiple controllers?

979


What is the difference between adding routes, to a webforms application and to an mvc application?

1019


What is Separation of Concerns in ASP.NET ASP.Net MVC?

1187


What is the advantage of using asp.net routing?

1106


What are the benefits of .net framework?

1019


Why to use “{resource}.axd/{*pathinfo}” in routing in mvc?

1137