.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Post New Resource Bookmark and Share   

String copy

Posted By:SanthoshNathan       Posted Date: November 01, 2010    Points: 15    Category:    URL: http://www.dotnetspark.com  

String copy
 

using System;

 namespace StringManipulation
 {
    public class TesterStringManipulationCopy
    {
       public void Run()
       {
           string s1 = "abcd";
           string s2 = "ABCD";

           // the string copy method
           string s5 = string.Copy(s2);
           Console.WriteLine(
               "s5 copied from s2: {0}", s5);

           // use the overloaded operator
           string s6 = s5;
           Console.WriteLine("s6 = s5: {0}", s6);
       }

       static void Main()
       {
          TesterStringManipulationCopy t = new TesterStringManipulationCopy();
          t.Run();
       }
    }
 }

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend