Return String Function in C#.Net


class
Program

       string strname = "Helow World";
       public string strfunction(string input)
      {
         string strmessage = input;
         return strmessage;
       }
   static
void Main(string[] args)
  {
   Program p = new Program();
   string str = p.strfunction(p.strname );
    Console.WriteLine("Input String is ="+str);
    Console.Read();
   }
}
Output:-
Input String is =Helow World
Ebook Download
View all
Learn
View all