Generic Property in C#
Posted
by ml123
on Stack Overflow
See other posts from Stack Overflow
or by ml123
Published on 2010-04-06T18:15:09Z
Indexed on
2010/04/06
18:23 UTC
Read the original article
Hit count: 436
Hi,
I'm not quite sure how to do that, but what I would like to do is to create a special type of property that will perform specific tasks at the get and set, and will be defined on generic type. For example, when writing this:
MyProp<String> name;
a pre-defined get and set will be performed on the string value.
How can that be done?
Thanks!
© Stack Overflow or respective owner