Read Extension of file in resources

后端 未结 1 1050
长发绾君心
长发绾君心 2021-01-07 04:39

How can I write a code to read the extension of a My.Resources file?

Example:

if i have a file named

相关标签:
1条回答
  • 2021-01-07 04:56

    If you have the filename you just need:

    sExt = System.IO.Path.GetExtension(sFileName)
    

    Or:

    sExt = sFileName.SubString(sFileName.LastIndexOf("."c))
    
    0 讨论(0)
提交回复
热议问题