Lately I was asked about difference with string and System.String and the right answer is that there’s no differences at all:
What is more efficient in respect of memory usage and performance: The use of string or the use of System.String?
The correct answer is It doesn’t matter which one you take, they perform equally.
stringis a synonym forSystem.String. Therefore it does not matter if you takestringorSystem.String.
Source.Equals(“CShapDotNETSecrets”);
Little more about string:
A string is a sequential collection of Unicode characters that is used to represent text. A String object is a sequential collection of System..::.Char objects that represent a string. The value of the String object is the content of the sequential collection, and that value is immutable.
A String object is called immutable (read-only) because its value cannot be modified once it has been created. Methods that appear to modify a String object actually return a new String object that contains the modification. If it is necessary to modify the actual contents of a string-like object, use the System.Text..::.StringBuilder class.
Source.Equals(“MSDN”);