Is it a dangerous or bad practice to call this string "String"?

I have a class called SerializableStringthat extends the base class CustomXmlSerializable. The base class provides methods for serializing and deserializing an XML derived class.

public class SerializableString : CustomXmlSerializable
{
    public string String { get; set; }
}

Obviously, I can call the property stringanything. But since this class is so general in nature, it would be nice to give it a very obvious name, such as "String". Thus, the property can be obtained as:

SerializableString userName = new SerializableString();
userName.String = "khargoosh";

This allows the compiler. Regardless of the nature of the class and ownership, would it be bad practice or dangerous to give one and only property in a class named "String"?

+4
2

, . Color Color : , Color , . , (Color) . ( , , Color Color.)

string String - ( ) string. string . .

- , . , - . / .

, Value:

public string Value { get; set; }
+4

, " , # , ".

, , String: , , , . , String , str - . , ( ) - , "String" ( str )

+1

Source: https://habr.com/ru/post/1615331/


All Articles