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
Joe Go
NA
1
1.2k
String vs char[]
Mar 23 2013 5:53 PM
I'm wondering after having looked at my assemblies with ildasm what would be the preferred method to use string constant values?
1) This creates a user string in the assembly:
var x = "bogus";
2) while this doesn't:
var x = new string(new char[] { 'b', 'o', 'g', 'u', 's' });
Say, one is going to use x for building XML-structures or other concatenating task, is there any advantage to using method 1 or 2 or is just 'same-same-but-different'?
Reply
Answers (
1
)
ASP.NET
How to link .aspx to .jsp page using c#???