c# - how to remove file format using substring -
i struggling understand how substring works in c#. how use substring in c# remove file format?
from :
test.xml
to:
test
although path.getfilenamewithoutextension
normal way it, can substring
. first have find period.
string name = "test.xml"; int pos = name.lastindexof('.'); if (pos >= 0) { name = name.substring(0, pos); }
Comments
Post a Comment