Click here to Skip to main content
16,008,010 members
Home / Discussions / C#
   

C#

 
GeneralFileSystemWatcher won't work with IIS Log Files Pin
Steve Cox6-Jan-03 10:42
Steve Cox6-Jan-03 10:42 
GeneralRe: FileSystemWatcher won't work with IIS Log Files Pin
Heath Stewart7-Jan-03 3:16
protectorHeath Stewart7-Jan-03 3:16 
GeneralRe: FileSystemWatcher won't work with IIS Log Files Pin
Steve Cox7-Jan-03 4:04
Steve Cox7-Jan-03 4:04 
GeneralFileSystemWatcher won't work with IIS Log Files Pin
Steve Cox6-Jan-03 10:42
Steve Cox6-Jan-03 10:42 
GeneralEquivalent of Java's <code>instanceof</code> in C# Pin
Le centriste6-Jan-03 9:46
Le centriste6-Jan-03 9:46 
GeneralRe: Equivalent of Java's <code>instanceof</code> in C# Pin
Nemanja Trifunovic6-Jan-03 10:04
Nemanja Trifunovic6-Jan-03 10:04 
GeneralRe: Equivalent of Java's <code>instanceof</code> in C# Pin
Rob Graham6-Jan-03 10:17
Rob Graham6-Jan-03 10:17 
GeneralRe: Equivalent of Java's <code>instanceof</code> in C# Pin
James T. Johnson6-Jan-03 10:19
James T. Johnson6-Jan-03 10:19 
As Nnamdi said, use the is keyword; but if you are just going to turn around and cast it, you should use as instead. as will do the cast and if it isn't of the correct type it will return null and you can check for that instead.

string str = obj as string;
if( str != null )
{ 
  // use str
}
else
{
  // obj is not a string
}
HTH,

James

"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation

GeneralThanks for your answers! Pin
Le centriste6-Jan-03 15:30
Le centriste6-Jan-03 15:30 
GeneralCOM Exception Pin
Lmani6-Jan-03 9:45
Lmani6-Jan-03 9:45 
Generaltoolwindow w/o focus Pin
Roger Alsing6-Jan-03 8:06
Roger Alsing6-Jan-03 8:06 
GeneralFileSystemWatcher Question Pin
OBRon6-Jan-03 7:53
OBRon6-Jan-03 7:53 
GeneralRe: FileSystemWatcher Question Pin
Eric Gunnerson (msft)6-Jan-03 13:26
Eric Gunnerson (msft)6-Jan-03 13:26 
GeneralProblems with SQL database connection string Pin
Member 29074626-Jan-03 7:34
Member 29074626-Jan-03 7:34 
GeneralRe: Problems with SQL database connection string Pin
OBRon6-Jan-03 7:42
OBRon6-Jan-03 7:42 
GeneralRe: Problems with SQL database connection string Pin
Paul Riley6-Jan-03 10:25
Paul Riley6-Jan-03 10:25 
GeneralRe: Problems with SQL database connection string Pin
Richard Deeming7-Jan-03 0:40
mveRichard Deeming7-Jan-03 0:40 
GeneralRe: Problems with SQL database connection string Pin
Steve McLenithan7-Jan-03 4:48
Steve McLenithan7-Jan-03 4:48 
GeneralIntPtr to a structure Pin
Nnamdi Onyeyiri6-Jan-03 6:32
Nnamdi Onyeyiri6-Jan-03 6:32 
GeneralRe: IntPtr to a structure Pin
leppie6-Jan-03 7:32
leppie6-Jan-03 7:32 
GeneralRe: IntPtr to a structure Pin
Nnamdi Onyeyiri6-Jan-03 7:34
Nnamdi Onyeyiri6-Jan-03 7:34 
GeneralRe: IntPtr to a structure Pin
leppie6-Jan-03 7:55
leppie6-Jan-03 7:55 
GeneralRe: IntPtr to a structure Pin
Nnamdi Onyeyiri6-Jan-03 7:58
Nnamdi Onyeyiri6-Jan-03 7:58 
GeneralRe: IntPtr to a structure Pin
leppie6-Jan-03 8:04
leppie6-Jan-03 8:04 
GeneralRe: IntPtr to a structure Pin
James T. Johnson6-Jan-03 14:49
James T. Johnson6-Jan-03 14:49 

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.