Hi,
There is a concept I haven't seen before. I can understand what is happening. But I don't know what this is.
It is not a class. It is not a method. What is it?
Maybe I know it, but i've been on my PC all day...

public DateTime Date 
    {
        get 
        {
            return date;
        }
        set 
        {  
               date = value; 
        }

    }

Recommended Answers

All 4 Replies

That was fast. Thank you very much.

That was fast.

I was in the neighborhood and it was an easy question. :)

Please mark the thread as answered, if you don't have any more questions on the topic.

Thanks.

I would write your code as an auto-implemented property.
DateTime Date { get; set; }
Let the compiler take care about the date field.
Also read this discussion about it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.