Module.GetMethods 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回模組中定義的全域方法。
GetMethods() |
傳回模組中定義的全域方法。 |
GetMethods(BindingFlags) |
傳回定義於模組上且符合指定繫結旗標的全域方法。 |
- 來源:
- Module.cs
- 來源:
- Module.cs
- 來源:
- Module.cs
傳回模組中定義的全域方法。
public:
cli::array <System::Reflection::MethodInfo ^> ^ GetMethods();
C#
public System.Reflection.MethodInfo[] GetMethods();
member this.GetMethods : unit -> System.Reflection.MethodInfo[]
Public Function GetMethods () As MethodInfo()
傳回
MethodInfo 物件的陣列,代表模組中定義的所有全域方法;如果沒有全域方法,則會傳回空陣列。
適用於
.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 | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.5, 1.6, 2.0, 2.1 |
- 來源:
- Module.cs
- 來源:
- Module.cs
- 來源:
- Module.cs
傳回定義於模組上且符合指定繫結旗標的全域方法。
public:
virtual cli::array <System::Reflection::MethodInfo ^> ^ GetMethods(System::Reflection::BindingFlags bindingFlags);
public:
cli::array <System::Reflection::MethodInfo ^> ^ GetMethods(System::Reflection::BindingFlags bindingFlags);
C#
public virtual System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingFlags);
C#
public System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingFlags);
abstract member GetMethods : System.Reflection.BindingFlags -> System.Reflection.MethodInfo[]
override this.GetMethods : System.Reflection.BindingFlags -> System.Reflection.MethodInfo[]
member this.GetMethods : System.Reflection.BindingFlags -> System.Reflection.MethodInfo[]
Public Overridable Function GetMethods (bindingFlags As BindingFlags) As MethodInfo()
Public Function GetMethods (bindingFlags As BindingFlags) As MethodInfo()
參數
- bindingFlags
- BindingFlags
限制搜尋範圍之 BindingFlags 值的位元組合。
傳回
類型 MethodInfo 的陣列,代表定義於模組上且符合指定繫結旗標的全域方法;如果沒有任何全域方法符合繫結旗標,即會傳回空陣列。
適用於
.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 | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.5, 1.6, 2.0, 2.1 |