My C # application sends me a stack trace when it throws an unhandled exception, and I look at it now when I don’t understand.
It seems that this may not be my mistake, but usually when I think that later I am mistaken. 8-) Here's the stack trace:
mscorlib caused an exception (ArgumentOutOfRangeException): startIndex cannot be larger than length of string.
Parameter name: startIndex
System.String::InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) + 6c
System.String::Substring(Int32 startIndex) + 0
System.IO.Directory::InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption) + 149
System.IO.Directory::GetFiles(String path, String searchPattern, SearchOption searchOption) + 1c
System.IO.Directory::GetFiles(String path) + 0
EntrianSourceSearch.Index::zz18ez() + 19b
EntrianSourceSearch.Index::zz18dz() + a
So my code (the names of the confusing functions at the end) is causing System.IO.Directory.GetFiles(path)that to crash with the row indexing problem.
Unfortunately, I do not know the value paththat was transmitted, but regardless of this, really shouldn't it be possible for the crash System.IO.Directory::GetFiles? Try so that I cannot come up with any argument GetFilesthat reproduces the failure.
.NET, -, ? ( , , , GetFiles, .)
: ! , Unicode, BMP, . GetFiles Reflector, , , , - GetDirectoryName() , , . Bizarre. BMP- ( {MUSICAL SYMBOL
G CLEF} 8-), .
- ( , BMP!). , .