create property than can have 3 default values "draw" "image" and "text" in csharp

You can achieve this by using an Enum with the default values you want and then creating a property of this Enum type in your class with a default value set.

Here is an example:

main.cs
public enum MyPropertyType
{
    Draw,
    Image,
    Text
}

public class MyClass
{
    public MyPropertyType MyProperty { get; set; } = MyPropertyType.Draw;
}
161 chars
12 lines

Now you can use the MyClass and set the MyProperty to one of the three pre-defined values of MyPropertyType enumeration or simply use the default value.

main.cs
var myInstance = new MyClass();
myInstance.MyProperty = MyPropertyType.Image;
myInstance.MyProperty = MyPropertyType.Draw;
myInstance.MyProperty = MyPropertyType.Text;
168 chars
5 lines

gistlibby LogSnag