First of all, the answer: no there is no such thing.
You can get some similar effect, but it cannot be the alias or behave exactly like the alias.
I don't want to discuss the rationale behind what you want by a very simple reason. I can see this: "I can simply copy the class between files and keep it the same". Since that moment, you are not going to do any programming, you are going into such a huge abuse that any programming activity would not make any sense at all; this would be a totally wrong way.
I would be happy to help you here, but I don't know how at this moment, as I cannot see where is your confusion. Anyway, I don't see how the alias of the property could be useful, what kind of abstraction could it provide. I don't think it could.
In the example you show, I don't even see a need in generic. A bit is a bit. You set it or clear (clear, not "reset"), by some index (bit shift). If you want to know how to do it, I can show you. Perhaps you need to explain your ultimate purpose, to get further help.
[EDIT #1]
Two more notes:
Your code looks like the class
System.Collections.BitArray
:
http://msdn.microsoft.com/en-us/library/system.collections.bitarray.aspx[
^].
You may need to look at this class to get some basic ideas. If you want to know how it works, I can explain you. This is a pretty simple thing.
Also, there is no such thing as "class property". A property can only be a member of a
class
or a
struct
. In some languages, "class property" is a more precise term for what is usually called "static property" in .NET, so this term is at least confusing.
[EDIT #2]
After the clarification in OP's comment below:
Please see my comment in reply, about the use of enumeration types. I have a detailed article on related topic which should help you:
Enumeration Types do not Enumerate! Working around .NET and Language Limitations[
^].
—SA