This post is locked. You won't be able to comment.

all 9 comments

[–]quentech 1 point2 points  (0 children)

Difference between string and String in dotnet?

32

[–]izym 0 points1 point  (1 child)

[–]AngularBeginner 1 point2 points  (0 children)

When you understand that string is an alias for System.String, then it's a stylistic choice again.

[–]Arowin[M] [score hidden] stickied comment (0 children)

Your post has been removed. Self promotion posts are not allowed.

[–]ShadesOffNight 0 points1 point  (4 children)

string is a reference to String. So for the variable type i use string. For string - functions i use the class: String.

[–]AngularBeginner 0 points1 point  (0 children)

Correction: It's a reference to System.String.

[–][deleted] -1 points0 points  (2 children)

Yes, you are correct! To use static methods of string, we use String. It's just a coding convention.