Kig i din SDK: public string Substring(int); Retrieves a substring from this instance. The substring starts at a specified character position.
public string Substring(int, int); Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.
Det har sådan set intet med VB vs. C# at gøre, det ligger i .NET frameworket, som en metode til klassen "System.string"....
string TotalStreng = "This is a total string"; string KunTotal = TotalStreng.Substring(TotalStreng.IndexOf("total"), "total".Length);
KunTotal vil nu være "total"
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.