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
Alexandre
NA
5
0
Immutability drawbacks
Dec 11 2009 2:25 PM
Hi all,
I'm currently working on a school project in c# and I've just got aware of the immutability concepts and advantages in c#.
The question is: what are the drawbacks of using it? I mean... every time you modify a string you create a new one, so if you have many strings to modify, there is lots of creation/deletion.. At which point the disadvantages surpass the advantages? Or, put in other words, when should I create immutable types and when should I not?
Thanks :)
PS: My example uses strings, but that's not about that type I'm worried (use stringbuilder if there's lots of manipulation to do), it's about another type I've created and that requires many manipulations over a lifetime.
Reply
Answers (
4
)
help needed with linked list code
help with my pinball game.