Breaking

Photo Gallery

Thursday, August 10, 2017

Basic use of string in C Sharp

In this post, i will explain basic use of string in day to day programming but before going to see an example first let me give you the basic details of string.



In C#, string is a data type which represents Unicode character. Some of the interviewer asked question like, Is there any difference between string and String(re: with Capital S) ?

Answer is NO because that string is an alias for System.String so you can also write System.String instead of string.However you will have to import "using System" to use string in your C# project.

Examples of String


Output




If you have any questions, post here. Also, provide your valuable suggestions and thoughts in form of comments in the section below.

Thank you !!!

No comments:

Post a Comment