Im from a c++ backround so I am not sure exactly how to do what Im trying to accomplish.

If myString1 = "hello"
and myString2 = "hello\0\0\0\0\0\0\0"

Im looking to trim off all of the null charecters.

Thanks.

Edit: So i was just trying to use the Remove method. I did:

int count = myString1.Length;
myString2.Remove(count);

But to no avail.

One more Edit: I didnt relize the Remove method returns a string. I got it working.

string str=" levydeewithspace ";
string newstr=str.Trim();

//This code remove all blank space present on both side of string.