英語で読む

次の方法で共有


TypeExtensions.GetProperty メソッド

定義

オーバーロード

GetProperty(Type, String)

ソース:
TypeExtensions.cs
ソース:
TypeExtensions.cs
ソース:
TypeExtensions.cs
C#
public static System.Reflection.PropertyInfo GetProperty(this Type type, string name);
C#
public static System.Reflection.PropertyInfo? GetProperty(this Type type, string name);

パラメーター

type
Type
name
String

戻り値

適用対象

.NET 10 およびその他のバージョン
製品 バージョン
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7.2 (package-provided)
.NET Standard 2.0 (package-provided)
UWP 10.0

GetProperty(Type, String, BindingFlags)

ソース:
TypeExtensions.cs
ソース:
TypeExtensions.cs
ソース:
TypeExtensions.cs
C#
public static System.Reflection.PropertyInfo GetProperty(Type type, string name, System.Reflection.BindingFlags bindingAttr);

パラメーター

type
Type
name
String
bindingAttr
BindingFlags

戻り値

適用対象

.NET 10 およびその他のバージョン
製品 バージョン
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7.2 (package-provided)
.NET Standard 2.0 (package-provided)
UWP 10.0

GetProperty(Type, String, Type)

ソース:
TypeExtensions.cs
ソース:
TypeExtensions.cs
ソース:
TypeExtensions.cs
C#
public static System.Reflection.PropertyInfo GetProperty(this Type type, string name, Type returnType);
C#
public static System.Reflection.PropertyInfo? GetProperty(this Type type, string name, Type? returnType);

パラメーター

type
Type
name
String
returnType
Type

戻り値

適用対象

.NET 10 およびその他のバージョン
製品 バージョン
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7.2 (package-provided)
.NET Standard 2.0 (package-provided)
UWP 10.0

GetProperty(Type, String, Type, Type[])

ソース:
TypeExtensions.cs
ソース:
TypeExtensions.cs
ソース:
TypeExtensions.cs
C#
public static System.Reflection.PropertyInfo GetProperty(this Type type, string name, Type returnType, Type[] types);
C#
public static System.Reflection.PropertyInfo? GetProperty(this Type type, string name, Type? returnType, Type[] types);

パラメーター

type
Type
name
String
returnType
Type
types
Type[]

戻り値

適用対象

.NET 10 およびその他のバージョン
製品 バージョン
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7.2 (package-provided)
.NET Standard 2.0 (package-provided)
UWP 10.0