I am doing string reverse while I have some problem with that. I have added code and O/P below. Please give me the detail explanation for this solution. I am beginner in C#.
CODE
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- string str = "ganesh";
- Console.WriteLine(new string(str.Reverse().ToArray()));
- Console.WriteLine(Convert.ToString(str.Reverse().ToArray()));
- Console.WriteLine((str.Reverse().ToArray()).ToString());
- Console.ReadKey();
- }
- }
- }
- hsenag
- System.Char[]
- System.Char[]
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sharad LavandPosted Jun 21, 2018, 8:52 AM