S
simon
I have datetime variable:
DateTime datum;
I set it and when I try to put it into a label:
labelDate.Text =datum.ToShortDateString;
I get an error:
Error 5 Cannot convert method group 'ToShortDateString' to non-delegate type
'string'. Did you intend to invoke the method?
I don't understand why this error?
labelDate.text is type of string and also datum.ToShortDateString should
return string.
It works if I use convert.toString function, but I don't know why I should
use convert function if both sides of equation are string?
Regards,Simon
DateTime datum;
I set it and when I try to put it into a label:
labelDate.Text =datum.ToShortDateString;
I get an error:
Error 5 Cannot convert method group 'ToShortDateString' to non-delegate type
'string'. Did you intend to invoke the method?
I don't understand why this error?
labelDate.text is type of string and also datum.ToShortDateString should
return string.
It works if I use convert.toString function, but I don't know why I should
use convert function if both sides of equation are string?
Regards,Simon