I cannot remember this....
System.IO.Path.GetFileName(filepath)
its IO.Path not IO.Directory or IO.File
Collection of unedited thoughts and bits of knowledge I can't seem to remember
Search This Blog
Showing posts with label C# Tips. Show all posts
Showing posts with label C# Tips. Show all posts
Monday, March 1, 2010
Saturday, October 3, 2009
Determine object type at runtime
from: http://en.csharp-online.net/CSharp_FAQ:_How_check_the_object_type_at_runtime
static bool isInteger (object o)
if (o is int || o is long)
{
return true;
}
else
{
return false;
}
if (o is int || o is long)
{
return true;
}
else
{
return false;
}
Subscribe to:
Posts (Atom)