Follow by Email

Tuesday, 11 December 2012

how to Split or get Part of a string in c#

Use this following Code snippet:


 string a = "12/12/2012";
        string[] substrings = a.Split('/');
    string    b = substrings[2];

OutPut:

      2012

0 comments:

Post a Comment


                                                            

 
Design by Abhinav Ranjan Sinha