Click here to Skip to main content
15,889,116 members
Home / Discussions / C#
   

C#

 
GeneralRe: A Link to forum Pin
Colin Angus Mackay12-May-05 2:52
Colin Angus Mackay12-May-05 2:52 
Generalchange image on CrystalReport Pin
fivestart200312-May-05 1:41
fivestart200312-May-05 1:41 
GeneralGuid to intPtr Pin
Mikke_x12-May-05 1:34
Mikke_x12-May-05 1:34 
Generallistview select Pin
x-trate12-May-05 0:28
x-trate12-May-05 0:28 
GeneralRe: listview select Pin
leppie12-May-05 2:14
leppie12-May-05 2:14 
Generalreinterpret_cast in C# Pin
trannampro11-May-05 22:56
trannampro11-May-05 22:56 
GeneralRe: reinterpret_cast in C# Pin
S. Senthil Kumar12-May-05 3:31
S. Senthil Kumar12-May-05 3:31 
GeneralRe: reinterpret_cast in C# Pin
mav.northwind12-May-05 23:16
mav.northwind12-May-05 23:16 
In addition to the previous answer you can also use the as keyword.
The cast operator will throw an exception when the conversion is not possible, with as you'll get a null reference.

For example:
void MyFunc(object o)<br />
{<br />
   MyType t = o as MyType;<br />
   if (t == null)<br />
      // o could not be converted to type MyType<br />
}


Regards,
mav
Questionconverting long to string, string to long? Pin
george ivanov11-May-05 22:47
george ivanov11-May-05 22:47 
AnswerRe: converting long to string, string to long? Pin
V.11-May-05 23:27
professionalV.11-May-05 23:27 
AnswerRe: converting long to string, string to long? Pin
Indagro11-May-05 23:31
Indagro11-May-05 23:31 
Generalthe one who know vb.net and cSharp Pin
Rizwan Bashir11-May-05 22:41
Rizwan Bashir11-May-05 22:41 
GeneralRe: the one who know vb.net and cSharp Pin
S. Senthil Kumar12-May-05 3:37
S. Senthil Kumar12-May-05 3:37 
GeneralRe: the one who know vb.net and cSharp Pin
Luis Alonso Ramos12-May-05 12:18
Luis Alonso Ramos12-May-05 12:18 
GeneralRe: the one who know vb.net and cSharp Pin
mav.northwind12-May-05 23:37
mav.northwind12-May-05 23:37 
GeneralRe: the one who know vb.net and cSharp Pin
Rizwan Bashir13-May-05 2:22
Rizwan Bashir13-May-05 2:22 
Generalopen .exe file Pin
eng.mohamed11-May-05 22:40
eng.mohamed11-May-05 22:40 
GeneralRe: open .exe file Pin
Polis Pilavas12-May-05 0:15
Polis Pilavas12-May-05 0:15 
GeneralNew to remote procedure calls, please help... Pin
AfzalHassen11-May-05 22:16
AfzalHassen11-May-05 22:16 
GeneralOOP concept - C# Pin
Anonymous11-May-05 21:34
Anonymous11-May-05 21:34 
GeneralRe: OOP concept - C# Pin
Peter Vertes12-May-05 12:15
Peter Vertes12-May-05 12:15 
GeneralRe: OOP concept - C# Pin
Anonymous12-May-05 23:18
Anonymous12-May-05 23:18 
QuestionHow to get streaming details from Flash Communication Server using C# Pin
vinu.netguy11-May-05 20:14
vinu.netguy11-May-05 20:14 
QuestionHow to make it happen Windows Control's Event in Code Pin
ye win zaw11-May-05 19:34
ye win zaw11-May-05 19:34 
AnswerRe: How to make it happen Windows Control's Event in Code Pin
Indagro12-May-05 0:02
Indagro12-May-05 0:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.