TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ganesamoorthi M
NA
129
1.5k
Convert.ToString() vs ToString() vs new string()
Jun 21 2018 7:06 AM
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();
}
}
}
OUTPUT
hsenag
System.Char[]
System.Char[]
Reply
Answers (
1
)
ASP.NET MVC jquery
Diffrence between Group_Concat and STRING_AGG