|
INTERVIEW QUESTIONS
MICROSOFT
C#
DETAILS
Question: Why strings are immutable?
Answer: 1) In VB6.0 and c++ strings are simple array of bytes, but in .Net it is class System.String and is immutable.
2) A string is a sequential collection of Unicode characters, which usually is used to represent text. A String, on the other hand, is a .NET Framework class (System.String) that represents a Unicode string with a sequential collection of System.Char structure.
|
|
|
Category |
C# Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 7666 users |
Added on |
7/28/2011 |
Views |
73570 |
Rate it! |
|
|
Question:
Why strings are immutable?
Answer:
1) In VB6.0 and c++ strings are simple array of bytes, but in .Net it is class System.String and is immutable.
2) A string is a sequential collection of Unicode characters, which usually is used to represent text. A String, on the other hand, is a .NET Framework class (System.String) that represents a Unicode string with a sequential collection of System.Char structure. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Why multiple Inheritance is not possible in C#?
|
View Answer
|
|
Constructor is the method which is implicitly created when ever a class is instantiated. Why?
|
View Answer
|
|
What Datatypes does the RangeValidator Control support?
|
View Answer
|
|
Where we can use DLL made in C#.Net
|
View Answer
|
|
How can objects be late bound in .NET?
|
View Answer
|
|
How to find exceptions in database
|
View Answer
|
|
How we can use inheritance and polymorphisms in c# programming?
|
View Answer
|
|
Can we use Friend Classes or functions in C# the way we use it in C++
|
View Answer
|
|
Can u create the instance for abstract classes
|
View Answer
|
|
Which keyword is used of specify a class that cannot inherit by other class?
|
View Answer
|
|
What is protected internal class in C#
|
View Answer
|
|
What is wrapper class?is it available in c#?
|
View Answer
|
|
Which debugging window allows you to see all the name and values of all the variables in scope?
|
View Answer
|
|
Which debugging window allows you to see the methods called in the order they were called?
|
View Answer
|
|
You have an event handler called MyEvent and you want to link the click event of control, MyButton, to use MyEvent, what is the code that will like them together?
|
View Answer
|
|
What is the difference between shadow and override
|
View Answer
|
|
How do I make a DLL in C#?
|
View Answer
|
|
Does C# support C type macros?
|
View Answer
|
|
Does C# support templates?
|
View Answer
|
|
How do I declare inout arguments in C#?
|
View Answer
|