How i get a name without the last 4 charecter using C# substring??

Posted by riad on Stack Overflow See other posts from Stack Overflow or by riad
Published on 2010-05-25T11:43:49Z Indexed on 2010/05/25 11:51 UTC
Read the original article Hit count: 188

Filed under:

Dear all,

Using this below code i get the name only first 4 character.But i need the name except the last 4 character.

string fileName = Textbox1.text;
string newName = fileName.Substring(0, 4);

//ex: input abcdef.txt //output:abcd

But i need output: abcdef

pls help!

thanks Riad

© Stack Overflow or respective owner

Related posts about c#