public static String getFileNameWithoutExt(String fullPath)
{
String path = "";
String fileName = "";
int pos = 0;
String sep = "";
separatePathAndFileName(fullPath, ref path, ref fileName);
pos = fileName.Length;
if (pos == 0)
{
return fullPath;
}
sep = fileName.Substring(pos, 1);
while (sep != ".")
{
pos = pos - 1;
if (pos == 0) { break; }
sep = fileName.Substring(pos, 1);
}
switch (pos)
{
case 0:
return fileName;
default:
return fileName.Substring(0, pos - 1);
}
}