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

Explain what is asp.net mvc?

1067


Is dapper better than entity framework?

926


explain why t4 entity is important in entity framework?

984


How to Redirect Tracing to a File

988


Explain the tools used for unit testing in ASP.Net MVC

1050


what is .edmx file and what it contains?

988


Explain entity lifecycle? : Entity framework

1000


What are the Core features of ASP.NET MVC?

1014


how do you mark a property as required? For example, for a project, the name is a required field.

1001


What is route config?

902


what is ssdl?

1098


What is the use .glimpse in mvc?

979


What is edm in entity framework?

932


Why to use html.partial in mvc?

1151


Explain linq to entities? : Entity framework

980