CString.Right

  • Thread starter Thread starter Selen
  • Start date Start date
S

Selen

I have a code
strDocExt=CString.Right(txtFileContents.PostedFile.FÝleName,4).ToLower();

in c# CString.Right equal what?

Thanks.
 
Two ways of doing this.

1) You could use the String.Substring [myStr.SubString(myStr.Length-4)] to
get the last N number of characters and compare it with the variable.
-- or --
2) Use the String.EndsWith method.
 
I want to this:
mystring is "selen"

I write something and I take "en" the last two character...


iletide þunu yazdý said:
Two ways of doing this.

1) You could use the String.Substring [myStr.SubString(myStr.Length-4)] to
get the last N number of characters and compare it with the variable.
-- or --
2) Use the String.EndsWith method.

Selen said:
I have a code
strDocExt=CString.Right(txtFileContents.PostedFile.FÝleName,4).ToLower();

in c# CString.Right equal what?

Thanks.
 
Selen said:
I want to this:
mystring is "selen"

I write something and I take "en" the last two character...

string right = myString.Substring (myString.Length-2);
 
Back
Top