System.Reflectionに問題があります。添付コードを参照してください: class Program
{
public static FieldInfo[] ReflectionMethod(object obj)
{
var flags = BindingFlags.Instance | BindingFlags.Static | BindingFla
私はクラスのプロパティのリストを取得するためにGetPropertiesを使用しています。 Dim properties As List(Of PropertyInfo) = objType.GetProperties(BindingFlags.Instance Or BindingFlags.Public).ToList()
For Each prop As PropertyInfo In p
特定のオブジェクト内のすべてのフィールドを取得するためにReflectionクラスを使用しています。以下のように私の問題は、しかし、フィールドは通常のクラスの中にあるとき、それは完璧に動作していることである :私はTEST1とTEST2の両方を取得します。ここ class test
{
string test1 = string.Empty;
string test2 = s