Quote:
|
Originally Posted by Validus
Thought I?d ask here, maybe some body knows.
I want to shorten the value of a string to 50 characters. Any tips? Kind of like substr() in PHP?
|
Here is your example in C#:
Code:
String myLongString = "This is a very long text. This is a very long text. This is a very long text. This is a very long text. This is a very long text. This is a very long text. This is a very long text. ";
String myShortString = myLongString.Substring(0, 50);
HTH