_Attributeとは? わかりやすく解説

Weblio 辞書 > 辞書・百科事典 > 日本語表現辞典 > _Attributeの意味・解説 

attribute

別表記:アトリビュート

「attribute」の意味・「attribute」とは

「attribute」は英語の単語で、主に二つの意味を持つ。一つ目は「属性」や「特性」という意味で、物事が持つ特徴や性質を指す。例えば、人間の属性として年齢や性別、職業などがある。二つ目は「帰する」という意味で、ある結果や状況が特定の原因や要素に由来すると考えることを指す。例えば、成功を努力に帰するという表現がある。

「attribute」の発音・読み方

「attribute」の発音は、意味によって異なる。名詞として「属性」を意味する場合、IPA表記では /ˈætrɪbjuːt/ となり、カタカナ表記では「アトリビュート」と読む。一方、動詞として「帰する」を意味する場合、IPA表記では /əˈtrɪbjuːt/ となり、カタカナ表記では「アトリビュート」と読む。

「attribute」の定義を英語で解説

「attribute」は、名詞としては "a quality or feature regarded as a characteristic or inherent part of someone or something" と定義され、特性や特徴といった意味を持つ。一方、動詞としては "regard something as being caused by" と定義され、ある事象や結果が特定の原因によるものと考える、という意味を持つ。

「attribute」の類語

「attribute」の類語としては、名詞としての意味では「characteristic」、「trait」、「feature」などがある。これらの単語も物事の特性や特徴を表す。動詞としての意味では、「ascribe」、「impute」、「credit」などがある。これらの単語も結果や事象を特定の原因に帰するという意味を持つ。

「attribute」に関連する用語・表現

「attribute」に関連する用語としては、「attributable」がある。これは形容詞で、「帰することができる」や「原因が特定のものにある」という意味を持つ。また、「attribute to」は「~に帰する」という意味の表現で、ある結果や状況を特定の原因に帰するときに用いる。

「attribute」の例文

1.英語例文(日本語訳):His success can be attributed to his hard work.(彼の成功は彼の努力に帰することができる。)
2.英語例文(日本語訳):Age and gender are two attributes of a person.(年齢と性別は人間の二つの属性である。)
3.英語例文(日本語訳):This painting is attributed to Picasso.(この絵はピカソの作とされている。)
4.英語例文(日本語訳):The attribute of a good leader is the ability to listen.(良いリーダーの特性は聞く能力である。)
5.英語例文(日本語訳):The increase in sales is attributed to the new marketing strategy.(売上の増加は新しいマーケティング戦略に帰する。)
6.英語例文(日本語訳):Color is an attribute of light.(色は光の属性である。)
7.英語例文(日本語訳):The decline in population is attributed to the low birth rate.(人口の減少は低出生率に帰する。)
8.英語例文(日本語訳):The attribute of water is its ability to take the shape of its container.(水の特性はその容器の形状を取る能力である。)
9.英語例文(日本語訳):The crime rate is often attributed to poverty.(犯罪率はしばしば貧困に帰する。)
10.英語例文(日本語訳):The attribute of a square is that all its sides are equal.(正方形の特性は全ての辺が等しいことである。)

attribute

別表記:アトリビュート

「attribute」とは、原因として〜に帰する・〜のせいである・〜のおかげであると主張すること若しくは人や物・場所にもともと備わっている特質・特性・性格のことを意味する英語表現である。

「attribute」とは・「attribute」の意味

「attribute」は動詞や名詞として使われる。動詞としての「attribute」とは、ある出来事の原因がどこにあるのかを示すために使われる言葉である。「attribute」は人間や組織などが主語になって原因や功績を主張するところに特徴がある。「attribute a to b」の形で「〜のせいにする」「〜のおかげとする」「原因として〜に帰する」という意味で用いられる。「attribute」は良いことと悪いことのどちらに対してでも使われる言葉である。

名詞としての「attribute」は人や物、場所にもともと備わっている性質や特徴を表した言葉である。性格の意味で用いられることもある。特質、特性、性格、属性、象徴物などと訳される。

「attribute」 のほかに「attribution」が名詞として用いられることもある。「attribution」は動詞の「attribute」を名詞化したものである。

「attribute」の語源・由来

「attribute」の語源はラテン語にある。ラテン語の「attribut」「attribuere」はad(〜の方へ)とtribuere(割り当てる、与える)に分解される。つまり、「割り当てること」がattributeの意味の中核となっている。

原因を何かに割り当てることからattributeは「〜のせいにする」「〜のおかげである」という意味の動詞になった。また、備わっている性質を様々な分類に割り当てることから属性という意味の名詞になった。

「attribute」の覚え方

「attribute」はtributeが「貢献、捧げる、割り当てる」という意味であることを頭に入れておくと覚えやすくなる。また、「attribute」は「attribute a to b」の形で使われることが多いが、例文をみていくとattributeがどのように使われるかが分かるようになるだろう。

「attribute」を含む英熟語・英語表現

「be attributed to」とは


「be attributed to」は「attribute a to b」を受動態にしたものである。「主語にくる事柄はtoの後にくる事柄が原因である」「主語にくる事柄はtoの後にくる事柄によって起きた」という意味で使われる。世の中で広く一般的に考えられていることを表現できるため、attributeは能動態よりも受動態として多く使われている。

「has no attribute」とは


ITの分野では対象の性質や設定などを示す付加情報をアトリビュートすなわち属性と呼ぶ。「has no attribute」とは、「主語にあたるものは属性が存在していない」と訳すことができ、オブジェクトに存在しない属性を指定すると表示される。プログラミングで属性エラーが生じていることを表している。


「attribute a to b」とは


「attribute a to b」には幾つかの使われ方がある。「attribute a to b」のaに結果、bには理由を表す言葉が置かれている場合には、「attribute a to b」は 「aの原因をbのせいにする」「aはbのおかげである」という意味で使われる。attributeは人間や集団が主語になることが多い。人や集団が考えた主観的な見解であるため、すべての人が主張に賛同しているわけではない。

「attribute a to b」のaに作品、bに作者や時代・場所を表した言葉を置かれることもある。その場合には、「作品がある作者(時代・場所)によって作られたと考える」という意味で使われる。

「attribute a to b」のaに性質・性格、bに人や生物を表した言葉を置いて、「性質・性格などが人や生物に属すると考える」という意味で使われることもある。

「attribute」の使い方・例文

「attribute」を動詞として使う場合は「attribute a to b」の形で使われる。名詞として「attribute」を使うときは特性、性格、象徴などと訳される。

・「He attributed his success to hard work.」(彼は成功を努力の賜物と考えた。)
・「People attributed his mistakes to his character.」(人々は彼の間違いを彼の性格のせいであると考えた。)
・「The doctor attributed her death to cancer.」(医者は彼女の死をガンに起因すると考えた。)
・「Many people attribute global warming to CO2.」(多くの人々は地球温暖化は二酸化炭素排出の結果であると考えている。)
・「Global warming is attributed to CO2 emissions.」(地球温暖化は二酸化炭素排出が原因である。)
・「I attribute courage to the lion.」(私はライオンには勇気があると考えている。)
・「The work is traditionally attributed to Shakespeare.」(その作品は古くからシェイクスピア作と考えられていた。)
・「An expert attributed this painting to Picasso in his early days.」(専門家はこの絵画がピカソの初期の作品だと言った。)
・「Kindness is an attribute of a gentleman.」(親切は紳士の一特性である。)
・「I was impressed with Mr.Smith’s personal attributes.」(私はスミス氏の人柄に好感を持っています。)
・「A crown is the attribute of a king.」(王冠は王の象徴である。)
・「He had many attributes of a good teacher.」(彼は良い教師としての多くの特性を備えていた。)

アトリビュート【attribute】

読み方:あとりびゅーと

1 《特性・属性の意》絵画や彫刻などで、神あるいは人物の役目・資格などを表すシンボル。例えば、王の冠と笏(しゃく)など。

2 ⇒属性3


アトリビュート

アトリビュートとは、(1)HTMLなどにおいて、開始タグの中に値(value)と共に記述されて、各要素の性質を定義する文字列のこと、あるいは(2)個々のファイルやデータに関する固有の情報、特性のことである。

(1)
別名:属性
【英】attribute

HTMLなどにおいて,開始タグの中に値(value)と共に記述されて,各要素の性質を定義する文字列のこと。代表的なものとしては,「alt属性」や「align属性」などがある。HTMLでは大文字,小文字の区別はないが、XHTMLでは大文字、小文字は区別され、標準ではすべて小文字で定義さている。同じタグでも属性の違いによりさまざまな働きをするため、タグとともに属性の内容を把握することが重要となる。

(2)
別名:属性
【英】attribute

個々のファイルやデータに関する固有の情報、特性のこと。具体的には、レコードの場合の形式やレコード長、データ名、ボリューム識別番号、用途、作成日などが属性にあたる。MS-DOSのファイルでは、システム属性、アーカイブ属性、リードオンリー属性、隠し属性の四種類がある。

WWWのほかの用語一覧
Flash:  Adobe Flex  Flash  待ち受けFlash
HTML:  アトリビュート  アンカー  C-HTML  CSS

Attribute クラス

カスタム属性の基本クラスを表します。

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<SerializableAttribute> _
<ClassInterfaceAttribute(ClassInterfaceType.None)> _
<ComVisibleAttribute(True)> _
<AttributeUsageAttribute(AttributeTargets.All, Inherited:=True, AllowMultiple:=False)>
 _
Public MustInherit Class
 Attribute
    Implements _Attribute
[SerializableAttribute] 
[ClassInterfaceAttribute(ClassInterfaceType.None)] 
[ComVisibleAttribute(true)] 
[AttributeUsageAttribute(AttributeTargets.All, Inherited=true,
 AllowMultiple=false)] 
public abstract class Attribute : _Attribute
[SerializableAttribute] 
[ClassInterfaceAttribute(ClassInterfaceType::None)] 
[ComVisibleAttribute(true)] 
[AttributeUsageAttribute(AttributeTargets::All, Inherited=true,
 AllowMultiple=false)] 
public ref class Attribute abstract : _Attribute
/** @attribute SerializableAttribute() */ 
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.None) */ 
/** @attribute ComVisibleAttribute(true) */ 
/** @attribute AttributeUsageAttribute(AttributeTargets.All, Inherited=true,
 AllowMultiple=false) */ 
public abstract class Attribute implements
 _Attribute
SerializableAttribute 
ClassInterfaceAttribute(ClassInterfaceType.None) 
ComVisibleAttribute(true) 
AttributeUsageAttribute(AttributeTargets.All, Inherited=true,
 AllowMultiple=false) 
public abstract class Attribute implements
 _Attribute
解説解説

Attribute クラスは、定義済みのシステム情報またはユーザー定義のカスタム情報をターゲット要素に関連付けます。ターゲット要素には、アセンブリ、クラス、コンストラクタ、デリゲート、列挙型、イベント、フィールド、インターフェイス、メソッド、移植可能な実行可能 (PE) ファイル モジュール、パラメータ、プロパティ、戻り値、構造体、または他の属性を指定できます。

属性が提供する情報は、メタデータとも呼ばれます。メタデータは、プログラムでデータをどのように処理するかを制御するために、アプリケーションによって実行時にチェックされる場合もあれば、アプリケーション自体をどのように処理または維持するかを制御するために、外部ツールによって実行時前にチェックされる場合もあります。たとえば、.NET Framework では、実行時の動作を制御するために、属性型を事前定義して使用します。また、一部のプログラミング言語では、属性型を使用して、.NET Framework の共通型システムで直接サポートされていない言語機能を表します。

すべての属性型は、Attribute クラスから直接または間接的に派生します。属性は、どのターゲット要素にでも適用できます。1 つのターゲット要素に複数の属性を適用できます。また、ターゲット要素から派生した要素に属性を継承することもできます。属性を適用するターゲット要素を指定するには、AttributeTargets クラスを使用します。

Attribute クラスには、カスタム属性を取得し、テストするための便利なメソッドが用意されています。属性の使用方法については、「属性を使用したメタデータの拡張」を参照してください。

使用例使用例

Attribute の使用方法を次のコード例に示します。

Imports System
Imports System.Reflection

Public Module CustomAttrVB

    ' An enumeration of animals. Start at 1 (0 = uninitialized).
    Public Enum Animal
        ' Pets
        Dog = 1
        Cat
        Bird
    End Enum

    ' Visual Basic requires the AttributeUsage be specified.
    ' A custom attribute to allow a target to have a pet.
    <AttributeUsage(AttributeTargets.Method)> _
    Public Class AnimalTypeAttribute
        Inherits Attribute

        ' The constructor is called when the attribute is set.
        Public Sub New(ByVal
 animal As Animal)
            Me.thePet = animal
        End Sub

        ' Keep a variable internally ...
        Protected thePet As Animal

        ' .. and show a copy to the outside world.
        Public Property Pet() As
 Animal
            Get
                Return thePet
            End Get
            Set(ByVal Value As
 Animal)
                thePet = Value
            End Set
        End Property

    End Class

    ' A test class where each method has its own pet.
    Class AnimalTypeTestClass

        <AnimalType(Animal.Dog)> _
        Public Sub DogMethod()
        End Sub

        <AnimalType(Animal.Cat)> _
        Public Sub CatMethod()
        End Sub

        <AnimalType(Animal.Bird)> _
        Public Sub BirdMethod()
        End Sub
    End Class

    ' The runtime test.
    Sub Main()
        Dim testClass As New
 AnimalTypeTestClass()
        Dim tcType As Type = testClass.GetType()
        Dim mInfo As MethodInfo
        ' Iterate through all the methods of the class.
        For Each mInfo In
 tcType.GetMethods()
            Dim attr As Attribute
            ' Iterate through all the attributes of the method.
            For Each attr In
 Attribute.GetCustomAttributes(mInfo)
                If TypeOf attr Is
 AnimalTypeAttribute Then
                    Dim attrCustom As AnimalTypeAttribute
 = _
                        CType(attr, AnimalTypeAttribute)
                    Console.WriteLine("Method {0} has a pet {1}
 attribute.", _
                         mInfo.Name(), attrCustom.Pet.ToString())
                End If
            Next
        Next
    End Sub
End Module

' Output:
' Method DogMethod has a pet Dog attribute.
' Method CatMethod has a pet Cat attribute.
' Method BirdMethod has a pet Bird attribute.
using System;
using System.Reflection;

namespace CustomAttrCS {
    // An enumeration of animals. Start at 1 (0 = uninitialized).
    public enum Animal {
        // Pets.
        Dog = 1,
        Cat,
        Bird,
    }

    // A custom attribute to allow a target to have a pet.
    public class AnimalTypeAttribute : Attribute
 {
        // The constructor is called when the attribute is set.
        public AnimalTypeAttribute(Animal pet) {
            thePet = pet;
        }

        // Keep a variable internally ...
        protected Animal thePet;

        // .. and show a copy to the outside world.
        public Animal Pet {
            get { return thePet; }
            set { thePet = Pet; }
        }
    }

    // A test class where each method has its own pet.
    class AnimalTypeTestClass {
        [AnimalType(Animal.Dog)]
        public void DogMethod() {}

        [AnimalType(Animal.Cat)]
        public void CatMethod() {}

        [AnimalType(Animal.Bird)]
        public void BirdMethod() {}
    }

    class DemoClass {
        static void Main(string[]
 args) {
            AnimalTypeTestClass testClass = new AnimalTypeTestClass();
            Type type = testClass.GetType();
            // Iterate through all the methods of the class.
            foreach(MethodInfo mInfo in type.GetMethods())
 {
                // Iterate through all the Attributes for each method.
                foreach (Attribute attr in
 
                    Attribute.GetCustomAttributes(mInfo)) {
                    // Check for the AnimalType attribute.
                    if (attr.GetType() == typeof(AnimalTypeAttribute))
                        Console.WriteLine(
                            "Method {0} has a pet {1} attribute.", 
                            mInfo.Name, ((AnimalTypeAttribute)attr).Pet);
                }

            }
        }
    }
}

/*
 * Output:
 * Method DogMethod has a pet Dog attribute.
 * Method CatMethod has a pet Cat attribute.
 * Method BirdMethod has a pet Bird attribute.
 */
using namespace System;
using namespace System::Reflection;

// An enumeration of animals. Start at 1 (0 = uninitialized).
public enum class Animal
{
   // Pets.
   Dog = 1,
   Cat, Bird
};

// A custom attribute to allow a target to have a pet.
public ref class AnimalTypeAttribute: public
 Attribute
{
public:

   // The constructor is called when the attribute is set.
   AnimalTypeAttribute( Animal pet )
   {
      thePet = pet;
   }


protected:

   // Keep a variable internally ...
   Animal thePet;

public:

   property Animal Pet 
   {
      // .. and show a copy to the outside world.
      Animal get()
      {
         return thePet;
      }

      void set( Animal value )
      {
         thePet = value;
      }
   }
};

// A test class where each method has its own pet.
ref class AnimalTypeTestClass
{
public:

   [AnimalType(Animal::Dog)]
   void DogMethod(){}


   [AnimalType(Animal::Cat)]
   void CatMethod(){}

   [AnimalType(Animal::Bird)]
   void BirdMethod(){}

};

int main()
{
   AnimalTypeTestClass^ testClass = gcnew AnimalTypeTestClass;
   Type^ type = testClass->GetType();

   // Iterate through all the methods of the class.
   System::Collections::IEnumerator^ myEnum = type->GetMethods()->GetEnumerator();
   while ( myEnum->MoveNext() )
   {
      MethodInfo^ mInfo = safe_cast<MethodInfo^>(myEnum->Current);

      // Iterate through all the Attributes for each method.
      System::Collections::IEnumerator^ myEnum1 = Attribute::GetCustomAttributes(
 mInfo )->GetEnumerator();
      while ( myEnum1->MoveNext() )
      {
         Attribute^ attr = safe_cast<Attribute^>(myEnum1->Current);

         // Check for the AnimalType attribute.
         if ( attr->GetType() == AnimalTypeAttribute::typeid
 )
                  Console::WriteLine( "Method {0} has a pet {1} attribute.",
 mInfo->Name, (dynamic_cast<AnimalTypeAttribute^>(attr))->Pet );
      }
   }
}

/*
 * Output:
 * Method DogMethod has a pet Dog attribute.
 * Method CatMethod has a pet Cat attribute.
 * Method BirdMethod has a pet Bird attribute.
 */
package CustomAttrJSL; 

import System.*;
import System.Reflection.*;
  
public class Animal
{
    protected int pet;
    public static final int
 dog = 1;
    public static final int
 cat = 2;
    public static final int
 bird = 3;

    public Animal()
    {
        pet = 0;
    } //Animal
    public Animal(int p)
    {
        pet = p;
    } //Animal
    public String getPet()
    {
        switch (pet) {
            case 1 :
                return "Dog";
            case 2 :
                return "Cat";
            case 3 :
                return "Bird";
            default :
                return null;
        }
    } //getPet
} //Animal
      
// A custom attribute to allow a target to have a pet.
/** @attribute System.AttributeUsageAttribute(AttributeTargets.Method)
 */
public class AnimalTypeAttribute extends Attribute
{
    public AnimalTypeAttribute() { }
    // The constructor is called when the attribute is set.
    public AnimalTypeAttribute(int pet)
    {
        thePet = new Animal(pet);
    } //AnimalTypeAttribute

    // Keep a variable internally...
    protected Animal thePet;

    //.. and show a copy to the outside world.
    /** @property 
     */
    public Animal get_Pet()
    {
        return thePet;
    } //get_Pet

    /** @property 
     */
    public void set_Pet(Animal value)
    {
        thePet = value;
    } //set_Pet
} //AnimalTypeAttribute
      
 // A test class where each method has its own pet.
class AnimalTypeTestClass
{
    /** @attribute AnimalType(Animal.dog)
     */
    public void DogMethod()
    {
    } //DogMethod

    /** @attribute AnimalType(Animal.cat)
     */
    public void CatMethod()
    {
    } //CatMethod

    /** @attribute AnimalType(Animal.bird)
     */
    public void BirdMethod()
    {
    } //BirdMethod
} //AnimalTypeTestClass
   
class DemoClass
{
    public static void main(String[]
 args)
    {
        AnimalTypeTestClass testClass = new AnimalTypeTestClass();
        Type type = testClass.GetType();
        // Iterate through all the methods of the class.
        for (int iCtr1 = 0; iCtr1 < type.GetMethods().length;
 iCtr1++) {
            MethodInfo mInfo = type.GetMethods()[iCtr1];
            // Iterate through all the Attributes for each method.
            for (int iCtr2 = 0; 
                iCtr2 < Attribute.GetCustomAttributes(mInfo).length; 
                iCtr2++) {
               
                Attribute attr = Attribute.GetCustomAttributes(mInfo)[iCtr2];
                // Check for the AnimalType attribute.
                if (attr.GetType().
                    Equals(AnimalTypeAttribute.class.ToType()))
 {                
                    Console.WriteLine("Method {0} has a pet {1} attribute.",
 
                        mInfo.get_Name(), 
                        ((AnimalTypeAttribute)attr).get_Pet().getPet());
                }
            }
        }
    } //main
} //DemoClass 

/*
 Output:
 Method DogMethod has a pet Dog attribute.
 Method CatMethod has a pet Cat attribute.
 Method BirdMethod has a pet Bird attribute.
*/
import System;
import System.Reflection;
import CustomAttrJS;

package CustomAttrJS {
    // An enumeration of animals. Start at 1 (0 = uninitialized).
    public enum Animal {
        // Pets.
        Dog = 1,
        Cat,
        Bird,
    }

    // A custom attribute to allow a target to have a pet.
    public AttributeUsage(AttributeTargets.Method) class
 AnimalTypeAttribute extends Attribute {
        // The constructor is called when the attribute is set.
        public function AnimalTypeAttribute(pet
 : Animal) {
            thePet = pet;
        }

        // Keep a variable internally ...
        protected var thePet : Animal;

        // .. and show a copy to the outside world.
        public function get
 Pet() : Animal {
                    return thePet; 
                }
        
                public function set
 Pet(pet : Animal) {
                    thePet = pet; 
                }
    }

    // A test class where each method has its own pet.
    class AnimalTypeTestClass {
        public AnimalTypeAttribute(Animal.Dog) 
                function DogMethod() {}

        public AnimalTypeAttribute(Animal.Cat)
        function CatMethod() {}

        public AnimalTypeAttribute(Animal.Bird)
        function BirdMethod() {}
    }
}



var testClass : AnimalTypeTestClass = new AnimalTypeTestClass();
var type : Type = testClass.GetType();
// Iterate through all the methods of the class.
            var mInfo : MethodInfo[] = type.GetMethods();
for (var i : int = 0; i
 < mInfo.length; i++) {
    // Iterate through all the Attributes for each method.
                    var attr : Attribute[] = Attribute.GetCustomAttributes(mInfo[i]);
    for (var j : int = 0;
 j < attr.length; j++) 
    {
        // Check for the AnimalType attribute.
        if (attr[j].GetType() == AnimalTypeAttribute)
            Console.WriteLine(
                "Method {0} has a pet {1} attribute.", 
                mInfo[i].Name, AnimalTypeAttribute(attr[j]).Pet);
    }

}


/*
 * Output:
 * Method BirdMethod has a pet Bird attribute.
 * Method CatMethod has a pet Cat attribute.
 * Method DogMethod has a pet Dog attribute.
 *
 */
継承階層継承階層
System.Object
  System.Attribute
     派生クラス
スレッド セーフスレッド セーフ

この型は、マルチスレッド操作に対して安全です。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Attribute コンストラクタ

Attribute クラスの新しいインスタンスを初期化します。

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

解説解説
使用例使用例

パラメータのカスタム Attribute クラスとそのコンストラクタの定義を次のコード例に示します。

' Define a custom parameter attribute that takes a single message argument.
<AttributeUsage(AttributeTargets.Parameter)>  _
Public Class ArgumentUsageAttribute
    Inherits Attribute
       
    ' This is the attribute constructor.
    Public Sub New(UsageMsg
 As String)
        Me.usageMsg = UsageMsg
    End Sub ' New

    ' usageMsg is storage for the attribute message.
    Protected usageMsg As String
       
    ' This is the Message property for the attribute.
    Public Property Message() As
 String
        Get
            Return usageMsg
        End Get
        Set
            usageMsg = value
        End Set
    End Property
End Class ' ArgumentUsageAttribute
 
// Define a custom parameter attribute that takes a single message argument.
[AttributeUsage( AttributeTargets.Parameter )]
public class ArgumentUsageAttribute : Attribute
{
    // This is the attribute constructor.
    public ArgumentUsageAttribute( string UsageMsg
 )
    {
        this.usageMsg = UsageMsg;
    }

    // usageMsg is storage for the attribute message.
    protected string usageMsg;

    // This is the Message property for the attribute.
    public string Message
    {
        get { return usageMsg; }
        set { usageMsg = value; }
    }
}
// Define a custom parameter attribute that takes a single message argument.

[AttributeUsage(AttributeTargets::Parameter)]
public ref class ArgumentUsageAttribute: public
 Attribute
{
protected:

   // usageMsg is storage for the attribute message.
   String^ usageMsg;

public:

   // This is the attribute constructor.
   ArgumentUsageAttribute( String^ UsageMsg )
   {
      this->usageMsg = UsageMsg;
   }


   property String^ Message 
   {
      // This is the Message property for the attribute.
      String^ get()
      {
         return usageMsg;
      }

      void set( String^ value )
      {
         this->usageMsg = value;
      }
   }
};
// Define a custom parameter attribute that takes a single message argument.
/** @attribute AttributeUsage(AttributeTargets.Parameter)
 */
public class ArgumentUsageAttribute extends
 Attribute
{
    // This is the attribute constructor.
    public ArgumentUsageAttribute(String usgMsg)
    {
        this.usageMsg = usgMsg;
    } //ArgumentUsageAttribute

    // usageMsg is storage for the attribute message.
    protected String usageMsg;

    // This is the Message property for the attribute.
    /** @property 
     */
    public String get_Message()
    {
        return usageMsg;
    } //get_Message

    /** @property 
     */
    public void set_Message(String value)
    {
        usageMsg = value;
    } //set_Message
} //ArgumentUsageAttribute  
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Attribute プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ TypeId 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。
参照参照

関連項目

Attribute クラス
System 名前空間

Attribute メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Equals オーバーロードされます。 オーバーライドされます。  
パブリック メソッド GetCustomAttribute オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。
パブリック メソッド GetCustomAttributes オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。
パブリック メソッド GetHashCode オーバーライドされます。 このインスタンスのハッシュ コードを返します。
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 ( Object から継承されます。)
パブリック メソッド IsDefaultAttribute 派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。
パブリック メソッド IsDefined オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。
パブリック メソッド Match 派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイスの実装
  名前 説明
インターフェイスの明示的な実装 System.Runtime.InteropServices._Attribute.GetIDsOfNames 一連の名前を対応する一連のディスパッチ識別子に割り当てます。
インターフェイスの明示的な実装 System.Runtime.InteropServices._Attribute.GetTypeInfo オブジェクトの型情報を取得します。この情報はインターフェイスの型情報の取得に使用できます。
インターフェイスの明示的な実装 System.Runtime.InteropServices._Attribute.GetTypeInfoCount オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。
インターフェイスの明示的な実装 System.Runtime.InteropServices._Attribute.Invoke オブジェクトが公開するプロパティおよびメソッドにアクセスできるようにします。
参照参照

関連項目

Attribute クラス
System 名前空間

Attribute メンバ

カスタム属性の基本クラスを表します。

Attribute データ型で公開されるメンバを以下の表に示します。


プロテクト コンストラクタプロテクト コンストラクタ
  名前 説明
プロテクト メソッド Attribute Attribute クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ TypeId 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。
パブリック メソッドパブリック メソッド
( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Equals オーバーロードされます。 オーバーライドされます。  
パブリック メソッド GetCustomAttribute オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。
パブリック メソッド GetCustomAttributes オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。
パブリック メソッド GetHashCode オーバーライドされます。 このインスタンスのハッシュ コードを返します。
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 (Object から継承されます。)
パブリック メソッド IsDefaultAttribute 派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。
パブリック メソッド IsDefined オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。
パブリック メソッド Match 派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイスの実装
  名前 説明
インターフェイスの明示的な実装 System.Runtime.InteropServices._Attribute.GetIDsOfNames 一連の名前を対応する一連のディスパッチ識別子に割り当てます。
インターフェイスの明示的な実装 System.Runtime.InteropServices._Attribute.GetTypeInfo オブジェクトの型情報を取得します。この情報はインターフェイスの型情報の取得に使用できます。
インターフェイスの明示的な実装 System.Runtime.InteropServices._Attribute.GetTypeInfoCount オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。
インターフェイスの明示的な実装 System.Runtime.InteropServices._Attribute.Invoke オブジェクトが公開するプロパティおよびメソッドにアクセスできるようにします。
参照参照

関連項目

Attribute クラス
System 名前空間

_Attribute インターフェイス

メモ : このインターフェイスは、.NET Framework version 2.0 で新しく追加されたものです。

System.Attribute クラスをアンマネージ コードに公開します。

 

名前空間: System.Runtime.InteropServices
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<ComVisibleAttribute(True)> _
<GuidAttribute("917B14D0-2D9E-38B8-92A9-381ACF52F7C0")>
 _
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)> _
<CLSCompliantAttribute(False)> _
Public Interface _Attribute
[ComVisibleAttribute(true)] 
[GuidAttribute("917B14D0-2D9E-38B8-92A9-381ACF52F7C0")] 
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] 
[CLSCompliantAttribute(false)] 
public interface _Attribute
[ComVisibleAttribute(true)] 
[GuidAttribute(L"917B14D0-2D9E-38B8-92A9-381ACF52F7C0")] 
[InterfaceTypeAttribute(ComInterfaceType::InterfaceIsIUnknown)] 
[CLSCompliantAttribute(false)] 
public interface class _Attribute
/** @attribute ComVisibleAttribute(true) */ 
/** @attribute GuidAttribute("917B14D0-2D9E-38B8-92A9-381ACF52F7C0") */
 
/** @attribute InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown) */ 
/** @attribute CLSCompliantAttribute(false) */ 
public interface _Attribute
ComVisibleAttribute(true) 
GuidAttribute("917B14D0-2D9E-38B8-92A9-381ACF52F7C0") 
InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown) 
CLSCompliantAttribute(false) 
public interface _Attribute
解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
_Attribute メンバ
System.Runtime.InteropServices 名前空間

_Attribute メソッド


_Attribute メンバ


属性

処理と製表をする前のデータは通常、生データ 1ないし未加工データ 1と呼ばれ、処理と製表をした後のデータは基礎データ 1ないし第一次データ 1と呼ばれる。基礎データは通常、統計表 4の形でまとめられた絶対値 3の系列 2からなる。このような表のデータは通常、年齢や子供数といった特定の変数 5ないし変量 5に関して分類されたり、特定の属性 6ないし特性 6(すなわち性、配偶関係等)に関して分類されたりする。データがいくつかの変数ないし属性に関して同時に分類されるような表は、クロス集計表 7ないし関連表(分割表) 7と呼ばれる。要約表 8は個別表 9ほど詳細でない情報をもたらす。



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「_Attribute」の関連用語

_Attributeのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



_Attributeのページの著作権

   
実用日本語表現辞典実用日本語表現辞典
Copyright © 2026実用日本語表現辞典 All Rights Reserved.
デジタル大辞泉デジタル大辞泉
(C)Shogakukan Inc.
株式会社 小学館
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.
IT用語辞典バイナリIT用語辞典バイナリ
Copyright © 2005-2026 Weblio 辞書 IT用語辞典バイナリさくいん。 この記事は、IT用語辞典バイナリの【アトリビュート】の記事を利用しております。
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.
コンテンツはAttribution-Share Alike 3.0 Unportedのライセンスで利用することができます。

©2026 GRAS Group, Inc.RSS