Difference between string and String

In this blog we will find out what is difference between string and String It is very interesting question for any software developer or it is very challenging for developer. I think you are very curious for knowing about it. I do not take your more time. Lt’s start practically with step by step.






Here we define here both string and String like:










After  execute this program getval contains:  Amit

We can see below:










And getname also contain: Amit

We can also see below:












And

Getval  and getname  contain same methods like:
Aggregate<>
Any<>
All<>
……
…..
Etc.

Now we come on our topic that what is difference between both (String and string).
After complete the execution of this program when we mouse over on
string is shows
class System.String

and we mouse over on
String  it also shown
Class System.String
Class System.String  statement clarify that string is alias name of String.

Conclusion : string is Alias name of String. Because both are contains same thing which you have see above.

No comments

Powered by Blogger.