static uint GetFileId(string fileName) { uint result; if (uint.TryParse(fileName, out result)) { return result; } return 0; }