Last post Feb 08, 2008 03:20 PM by nirniron
Feb 08, 2008 02:16 PM|maxmax|LINK
I am developing asp.net 2.0 application in which I have to use
Dim va as string
tell me what is the substring method
what is the use of substring method, show me demo or explain me in little bit more details
Feb 08, 2008 02:23 PM|Manohar Shrestha|LINK
Here is the link for your answer;
Feb 08, 2008 02:25 PM|talha83|LINK
Let's suppose if you have a string:
string s = "<!-- Start Here This is a test End Here-->";
and you want to display the value from !, you would use Substring:
s = s.Substring(1, 10);
Now the value of s is "!-- Start "
So basically it's used to get a value of a string from the given index (1 in our case) to the length (10 in our case).
Feb 08, 2008 02:27 PM|HosamKamel|LINK
Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.
take a look on the method documenttation on MSDN
String..::.Substring Method (Int32, Int32)
Feb 08, 2008 02:27 PM|vinz|LINK
Here's an article that explains on how to use substring method
Feb 08, 2008 02:40 PM|Suprotim Agarwal|LINK
Get a desription of it in the documentation.
Feb 08, 2008 03:20 PM|nirniron|LINK
well substring method is like the same mathod from other languages C++,C, more on...
the method works only on string types and it cuts of the string.
the methode takes 2 parmeters :
the first parmeter :from where is start to cut my string
the second parmeter is how much (letters) do i want to cut from my string
String MyString="hello world";
the result will be:
need more ask me again
Don't forget to click "Mark as Answer" on the post that helped you.