Monday, June 24, 2019

Set Default Value in property in c# or Set Value in property in c#

1. Using Constructor

class Person 
{
    public Person()
    {
        Name = "Default Name";
    }
    public string Name { get; set; }
}
2. Normal

private string name = "Default Name";
public string Name 
{
    get 
    {
        return name;
    }
    set
    {
        name = value;
    }
}

No comments:

Post a Comment

Convert 1.25x speed spent hours convert into normal (1x) speed spent hours

If I run a video with 1.25x or 125% speed till 1 hour 26 minuts, then normal hours will be ?   1 hours 26 minuts convert into hours Total 60...