GetType()は、基本クラスから呼び出されたときに最も派生した型を返しますか?
例:
public abstract class A
{
    private Type GetInfo()
    {
         return System.Attribute.GetCustomAttributes(this.GetType());
    }
}
public class B : A
{
   //Fields here have some custom attributes added to them
}
または、派生クラスが次のように実装する必要がある抽象メソッドを作成する必要がありますか?
public abstract class A
{
    protected abstract Type GetSubType();
    private Type GetInfo()
    {
         return System.Attribute.GetCustomAttributes(GetSubType());
    }
}
public class B : A
{
   //Fields here have some custom attributes added to them
   protected Type GetSubType()
   {
       return GetType();
   }
}
                
                10
              
                  まあ-あなたはそれを試してみましたか?
                
                
                  
                    —
                    BrokenGlass 
                    
                  
                
              
                  @BrokenGlass通常はそれを行うだけですが、コンピューターではありません...問題の解決策が形成され始めていて、今知りたいと思っていたので、電話を使用して投稿を作成しました!= P
                
                
                  
                    —
                    Feisty Mango 2011