This page defines a list of "the kinds of members a class or struct may contain". But is there a more concise or technical term for "kind of member"? Member kind? Member type?
In other words, assuming you had the following declaration:
private string name;
how would you complete the following table?
Name = name
Type = string
Scope = private
? = field
There´s the abstract base-class MemberInfo
that defines most of those terms. Eg there´s the MemberType
, which indicates if a member is a constructor , a method , an event , a property or whatever.
Furthermore some derived classes also have some kind of a datatype. Eg if your member is a method it has a ReturnType
, while properties have a PropertyType
and fields a FieldType
. However a constructor for example has no type. An event on the other side has an EventHandlerType
, that will return the delegate-type.
The scope applies to the IsPublic
, IsAssembly
and IsPrivate
-properties. However those are only defined for fields and methods.
Having said this the most common terms I´m aware of are those:
(Member-)Name
MemberType: constructor, method, event ...
DataType: string, int, ...
Scope: private, public, ...
However there´s no single technical term for each of them, as depending on the MemberType
the other terms may have slightly different meanings.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.