TypeInfo.GetProperty 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
GetProperty(String) | |
GetProperty(String, BindingFlags) | |
GetProperty(String, Type) | |
GetProperty(String, Type[]) | |
GetProperty(String, Type, Type[]) | |
GetProperty(String, Type, Type[], ParameterModifier[]) |
public:
System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name);
C#
public System.Reflection.PropertyInfo GetProperty(string name);
member this.GetProperty : string -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String) As PropertyInfo
參數
- name
- String
傳回
適用於
.NET Core 1.1 和其他版本
產品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1 |
.NET Standard | 1.5, 1.6 |
public:
System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
C#
public System.Reflection.PropertyInfo GetProperty(string name, System.Reflection.BindingFlags bindingAttr);
member this.GetProperty : string * System.Reflection.BindingFlags -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, bindingAttr As BindingFlags) As PropertyInfo
參數
- name
- String
- bindingAttr
- BindingFlags
傳回
適用於
.NET Core 1.1 和其他版本
產品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1 |
.NET Standard | 1.5, 1.6 |
public:
System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, Type ^ returnType);
C#
public System.Reflection.PropertyInfo GetProperty(string name, Type returnType);
member this.GetProperty : string * Type -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, returnType As Type) As PropertyInfo
參數
- name
- String
- returnType
- Type
傳回
適用於
.NET Core 1.1 和其他版本
產品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1 |
.NET Standard | 1.5, 1.6 |
public:
System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, cli::array <Type ^> ^ types);
C#
public System.Reflection.PropertyInfo GetProperty(string name, Type[] types);
member this.GetProperty : string * Type[] -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, types As Type()) As PropertyInfo
參數
- name
- String
- types
- Type[]
傳回
適用於
.NET Core 1.1 和其他版本
產品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1 |
.NET Standard | 1.5, 1.6 |
public:
System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, Type ^ returnType, cli::array <Type ^> ^ types);
C#
public System.Reflection.PropertyInfo GetProperty(string name, Type returnType, Type[] types);
member this.GetProperty : string * Type * Type[] -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, returnType As Type, types As Type()) As PropertyInfo
參數
- name
- String
- returnType
- Type
- types
- Type[]
傳回
適用於
.NET Core 1.1 和其他版本
產品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1 |
.NET Standard | 1.5, 1.6 |
public:
System::Reflection::PropertyInfo ^ GetProperty(System::String ^ name, Type ^ returnType, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
C#
public System.Reflection.PropertyInfo GetProperty(string name, Type returnType, Type[] types, System.Reflection.ParameterModifier[] modifiers);
member this.GetProperty : string * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
Public Function GetProperty (name As String, returnType As Type, types As Type(), modifiers As ParameterModifier()) As PropertyInfo
參數
- name
- String
- returnType
- Type
- types
- Type[]
- modifiers
- ParameterModifier[]
傳回
適用於
.NET Core 1.1 和其他版本
產品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1 |
.NET Standard | 1.5, 1.6 |