Click here to Skip to main content
15,893,508 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello
I want to know implicit and explicit Conversion Any Body help me

Thanks
Dreen
Posted
Updated 19-Sep-12 20:15pm
v2
Comments
Kuthuparakkal 20-Sep-12 2:14am    
MSDN is the right resource
AmitGajjar 20-Sep-12 2:16am    
correct
Andrei Straut 20-Sep-12 2:24am    
I think that NoEffort tag is one of the most useful around here, speaks volumes about each question! Love it ever since I found it :thumbsup:

Search broken for you?

Implicit[^]

Explicit[^]

You really need to make more effort yourself.
 
Share this answer
 
Implicit conversion operators can be called implicitly, without being specified by explicit casts in the source code.

Unlike implicit conversion, explicit conversion operators must be invoked via a cast.
C#
//Implicit conversion
int total = 100;
string str = "Total number is : ";
Console.WriteLine(str + total);

//Explicit Converion
Object obj = new object();
int i = (int)obj + 5;


http://msdn.microsoft.com/en-us/library/z5z9kes2(v=vs.71).aspx[^]
http://msdn.microsoft.com/en-us/library/xhbhezf4(v=vs.71).aspx[^]

Codeproject is always the best source, refer here,
Type conversions with implicit and explicit operators[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900