Strings are Immutable | C# Interview Questions | Csharp Interview Questions

  Рет қаралды 11,034

Questpond

Questpond

Күн бұрын

Пікірлер: 15
@questpondvideos
@questpondvideos 3 жыл бұрын
30 Important C# Interview Questions : kzbin.info/www/bejne/eHzcn3h4hdacf68 25+ OOPS Interview Questions : kzbin.info/www/bejne/q2qcqHSld893rLM Software Architecture Interview Questions : kzbin.info/www/bejne/d6W3mJaYgbSkg68 20+ SQL Server Interview Questions : kzbin.info/www/bejne/iXbHcnluorh-iZY 10+ Power BI Interview Questions : kzbin.info/www/bejne/eaDdlGyNg6eFqpY 20 MSBI Interview Questions : kzbin.info/www/bejne/hKjCpHt7gNOCi6c SQL Server Joins : kzbin.info/www/bejne/gYXZint7o9mppJo SQL Step by Step - kzbin.info/www/bejne/q3jPl4NvpJyeo7s Angular Step by Step Tutorial for Beginners : kzbin.info/www/bejne/Y2q5lIptgqd3qZo 25 Angular Interview Questions : kzbin.info/www/bejne/Y5vIoKx6f6mmia8 25 Important ASP.NET Interview Questions : kzbin.info/www/bejne/ponQfpejf7p2Zsk 35 Important JavaScript Interview Questions : kzbin.info/www/bejne/kJOXlYOfbKh0hLc 20 MySQL Interview Questions : kzbin.info/www/bejne/b5nJm3Zjd9WMaJI 5 MSBI Interview Questions : kzbin.info/www/bejne/a3abYmiXjaaqj7M 20 PHP Interview Questions : kzbin.info/www/bejne/Z5PTf4avo7qlopo
@pravinkshirsagar8464
@pravinkshirsagar8464 3 жыл бұрын
1. String is reference type. 2. Internally it uses Array to save value. 3. Array have fixed size. 4. If we are going to store dynamic value in string every time, that array will not store the same because of size. 5. So every time fresh objects are created. 6. Thats why string are immutable.
@Girishur
@Girishur 4 жыл бұрын
Dear sir thank you for efforts. String are immutable because strings are reference type and 1.multiple string variables with the same value then it will avoid allocating memory for the same string value multiple times. 2. immutable strings eliminate race conditions in multi-threaded applications
@jayjeckel
@jayjeckel 4 жыл бұрын
Strings are immutable and strings are reference type. They aren't immutable because they are reference type. A reference type can be mutable, for example List is a reference type and is mutable.
@pratikgirme775
@pratikgirme775 3 жыл бұрын
Dear Sir, Thank you so much for giving such a clear understanding of this concept. I was aware of string is immutable, but how to prove it, I got this from this video.
@jayjeckel
@jayjeckel 4 жыл бұрын
Nice video. I especially like how you used the diagnostic window to show all the string objects being garbage collected.
@_Ten_
@_Ten_ 2 жыл бұрын
Great video.
@maheshpatkar886
@maheshpatkar886 3 жыл бұрын
The reason for string being immutable object is that in case of assignment of one string variable to another string , any change in the previous string would lead to unwanted changes in the copied string just like other reference types
@Abdullah_khan333
@Abdullah_khan333 5 ай бұрын
well explained
@miscVideo007
@miscVideo007 3 жыл бұрын
Why this behavior of string are there , i mean immutable ?
@omkargorde7062
@omkargorde7062 4 жыл бұрын
What is the best way to avoid immutable functionality of string?
@jayjeckel
@jayjeckel 4 жыл бұрын
You can't. Strings are immutable and that can't be avoided using strings. If you need a string-like object that is mutable, then you should use the StringBuilder class.
@ParidhiStyle
@ParidhiStyle 3 жыл бұрын
Use string builder
@ParidhiStyle
@ParidhiStyle 3 жыл бұрын
Everyone it create new object. Because it is reference type.
@atulparashar4846
@atulparashar4846 3 жыл бұрын
Because string is thread safe in c#
Java Strings are Immutable - Here's What That Actually Means
7:06
Coding with John
Рет қаралды 627 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
Programming Terms: Mutable vs Immutable
7:06
Corey Schafer
Рет қаралды 104 М.
Understand your C# queries! IEnumerable & IQueryable in explained
11:28
tutorialsEU - C#
Рет қаралды 41 М.
You Completely Misunderstand How Strings Work in C#
8:46
Nick Chapsas
Рет қаралды 45 М.
Every single feature of C# in 10 minutes
9:50
Train To Code
Рет қаралды 169 М.
What is mutable vs. immutable infrastructure?
11:40
HashiCorp
Рет қаралды 65 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 196 М.