FlagsAttribute Sınıf
Tanım
Bir numaralandırmanın bir bit alanı olarak değerlendirileceğini belirtir; Yani, bir bayrak kümesi.Indicates that an enumeration can be treated as a bit field; that is, a set of flags.
public ref class FlagsAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Enum, Inherited=false)]
public class FlagsAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Enum, Inherited=false)]
[System.Serializable]
public class FlagsAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Enum, Inherited=false)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class FlagsAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Enum, Inherited=false)>]
type FlagsAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Enum, Inherited=false)>]
[<System.Serializable>]
type FlagsAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Enum, Inherited=false)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type FlagsAttribute = class
inherit Attribute
Public Class FlagsAttribute
Inherits Attribute
- Devralma
- Öznitelikler
Örnekler
Aşağıdaki örnek, özniteliğinin kullanımını gösterir FlagsAttribute
ve ToString bir bildirimde kullanma yöntemi üzerindeki etkiyi gösterir FlagsAttribute
Enum .The following example illustrates the use of the FlagsAttribute
attribute and shows the effect on the ToString method of using FlagsAttribute
on an Enum declaration.
using namespace System;
// Define an Enum without FlagsAttribute.
public enum class SingleHue : short
{
None = 0,
Black = 1,
Red = 2,
Green = 4,
Blue = 8
};
// Define an Enum with FlagsAttribute.
[Flags]
enum class MultiHue : short
{
None = 0,
Black = 1,
Red = 2,
Green = 4,
Blue = 8
};
int main()
{
// Display all possible combinations of values.
Console::WriteLine(
"All possible combinations of values without FlagsAttribute:");
for (int val = 0; val <= 16; val++)
Console::WriteLine("{0,3} - {1:G}", val, (SingleHue)val);
Console::WriteLine(
"\nAll possible combinations of values with FlagsAttribute:");
// Display all combinations of values, and invalid values.
for (int val = 0; val <= 16; val++ )
Console::WriteLine("{0,3} - {1:G}", val, (MultiHue)val);
}
// The example displays the following output:
// All possible combinations of values without FlagsAttribute:
// 0 - None
// 1 - Black
// 2 - Red
// 3 - 3
// 4 - Green
// 5 - 5
// 6 - 6
// 7 - 7
// 8 - Blue
// 9 - 9
// 10 - 10
// 11 - 11
// 12 - 12
// 13 - 13
// 14 - 14
// 15 - 15
// 16 - 16
//
// All possible combinations of values with FlagsAttribute:
// 0 - None
// 1 - Black
// 2 - Red
// 3 - Black, Red
// 4 - Green
// 5 - Black, Green
// 6 - Red, Green
// 7 - Black, Red, Green
// 8 - Blue
// 9 - Black, Blue
// 10 - Red, Blue
// 11 - Black, Red, Blue
// 12 - Green, Blue
// 13 - Black, Green, Blue
// 14 - Red, Green, Blue
// 15 - Black, Red, Green, Blue
// 16 - 16
using System;
class Example
{
// Define an Enum without FlagsAttribute.
enum SingleHue : short
{
None = 0,
Black = 1,
Red = 2,
Green = 4,
Blue = 8
};
// Define an Enum with FlagsAttribute.
[Flags]
enum MultiHue : short
{
None = 0,
Black = 1,
Red = 2,
Green = 4,
Blue = 8
};
static void Main( )
{
// Display all possible combinations of values.
Console.WriteLine(
"All possible combinations of values without FlagsAttribute:");
for(int val = 0; val <= 16; val++ )
Console.WriteLine( "{0,3} - {1:G}", val, (SingleHue)val);
// Display all combinations of values, and invalid values.
Console.WriteLine(
"\nAll possible combinations of values with FlagsAttribute:");
for( int val = 0; val <= 16; val++ )
Console.WriteLine( "{0,3} - {1:G}", val, (MultiHue)val);
}
}
// The example displays the following output:
// All possible combinations of values without FlagsAttribute:
// 0 - None
// 1 - Black
// 2 - Red
// 3 - 3
// 4 - Green
// 5 - 5
// 6 - 6
// 7 - 7
// 8 - Blue
// 9 - 9
// 10 - 10
// 11 - 11
// 12 - 12
// 13 - 13
// 14 - 14
// 15 - 15
// 16 - 16
//
// All possible combinations of values with FlagsAttribute:
// 0 - None
// 1 - Black
// 2 - Red
// 3 - Black, Red
// 4 - Green
// 5 - Black, Green
// 6 - Red, Green
// 7 - Black, Red, Green
// 8 - Blue
// 9 - Black, Blue
// 10 - Red, Blue
// 11 - Black, Red, Blue
// 12 - Green, Blue
// 13 - Black, Green, Blue
// 14 - Red, Green, Blue
// 15 - Black, Red, Green, Blue
// 16 - 16
Module Example
' Define an Enum without FlagsAttribute.
Enum SingleHue As Short
None = 0
Black = 1
Red = 2
Green = 4
Blue = 8
End Enum
' Define an Enum with FlagsAttribute.
<Flags()>
Enum MultiHue As Short
None = 0
Black = 1
Red = 2
Green = 4
Blue = 8
End Enum
Sub Main()
' Display all possible combinations of values.
Console.WriteLine(
"All possible combinations of values without FlagsAttribute:")
For val As Integer = 0 To 16
Console.WriteLine("{0,3} - {1:G}", val, CType(val, SingleHue))
Next
Console.WriteLine()
' Display all combinations of values, and invalid values.
Console.WriteLine(
"All possible combinations of values with FlagsAttribute:")
For val As Integer = 0 To 16
Console.WriteLine( "{0,3} - {1:G}", val, CType(val, MultiHue))
Next
End Sub
End Module
' The example displays the following output:
' All possible combinations of values without FlagsAttribute:
' 0 - None
' 1 - Black
' 2 - Red
' 3 - 3
' 4 - Green
' 5 - 5
' 6 - 6
' 7 - 7
' 8 - Blue
' 9 - 9
' 10 - 10
' 11 - 11
' 12 - 12
' 13 - 13
' 14 - 14
' 15 - 15
' 16 - 16
'
' All possible combinations of values with FlagsAttribute:
' 0 - None
' 1 - Black
' 2 - Red
' 3 - Black, Red
' 4 - Green
' 5 - Black, Green
' 6 - Red, Green
' 7 - Black, Red, Green
' 8 - Blue
' 9 - Black, Blue
' 10 - Red, Blue
' 11 - Black, Red, Blue
' 12 - Green, Blue
' 13 - Black, Green, Blue
' 14 - Red, Green, Blue
' 15 - Black, Red, Green, Blue
' 16 - 16
Yukarıdaki örnek, renkle ilgili iki numaralandırmayı tanımlar SingleHue
ve MultiHue
.The preceding example defines two color-related enumerations, SingleHue
and MultiHue
. İkinci öğesinin özniteliği vardır FlagsAttribute
; ilki değildir.The latter has the FlagsAttribute
attribute; the former does not. Örnek, sabit listesi türünün temel alınan değerlerini temsil etmediği tamsayılar de dahil olmak üzere, bir dizi tamsayının davranışını gösterir, numaralandırma türüne ve bunların dize temsillerine dönüştürülür.The example shows the difference in behavior when a range of integers, including integers that do not represent underlying values of the enumeration type, are cast to the enumeration type and their string representations displayed. Örneğin, 3 SingleHue
' ün bir üyenin temel aldığı değer olmadığı için 3 değeri olarak temsil edilemez SingleHue
, ancak FlagsAttribute
öznitelik 3 ' ün bir değeri olarak temsil etmesini mümkün hale getirir MultiHue
Black, Red
.For example, note that 3 cannot be represented as a SingleHue
value because 3 is not the underlying value of any SingleHue
member, whereas the FlagsAttribute
attribute makes it possible to represent 3 as a MultiHue
value of Black, Red
.
Aşağıdaki örnek, özniteliğiyle birlikte başka bir sabit listesi tanımlar FlagsAttribute
ve bir numaralandırma değerinde bir veya daha fazla bit alanın ayarlanmış olup olmadığını anlamak için bit düzeyinde mantıksal ve eşitlik işleçlerini nasıl kullanacağınızı gösterir.The following example defines another enumeration with the FlagsAttribute
attribute and shows how to use bitwise logical and equality operators to determine whether one or more bit fields are set in an enumeration value. Enum.HasFlagBunu yapmak için yöntemini de kullanabilirsiniz, ancak bu örnekte gösterilmez.You can also use the Enum.HasFlag method to do that, but that is not shown in this example.
using namespace System;
[Flags]
enum class PhoneService
{
None = 0,
LandLine = 1,
Cell = 2,
Fax = 4,
Internet = 8,
Other = 16
};
void main()
{
// Define three variables representing the types of phone service
// in three households.
PhoneService household1 = PhoneService::LandLine | PhoneService::Cell |
PhoneService::Internet;
PhoneService household2 = PhoneService::None;
PhoneService household3 = PhoneService::Cell | PhoneService::Internet;
// Store the variables in an array for ease of access.
array<PhoneService>^ households = { household1, household2, household3 };
// Which households have no service?
for (int ctr = 0; ctr < households->Length; ctr++)
Console::WriteLine("Household {0} has phone service: {1}",
ctr + 1,
households[ctr] == PhoneService::None ?
"No" : "Yes");
Console::WriteLine();
// Which households have cell phone service?
for (int ctr = 0; ctr < households->Length; ctr++)
Console::WriteLine("Household {0} has cell phone service: {1}",
ctr + 1,
(households[ctr] & PhoneService::Cell) == PhoneService::Cell ?
"Yes" : "No");
Console::WriteLine();
// Which households have cell phones and land lines?
PhoneService cellAndLand = PhoneService::Cell | PhoneService::LandLine;
for (int ctr = 0; ctr < households->Length; ctr++)
Console::WriteLine("Household {0} has cell and land line service: {1}",
ctr + 1,
(households[ctr] & cellAndLand) == cellAndLand ?
"Yes" : "No");
Console::WriteLine();
// List all types of service of each household?//
for (int ctr = 0; ctr < households->Length; ctr++)
Console::WriteLine("Household {0} has: {1:G}",
ctr + 1, households[ctr]);
Console::WriteLine();
}
// The example displays the following output:
// Household 1 has phone service: Yes
// Household 2 has phone service: No
// Household 3 has phone service: Yes
//
// Household 1 has cell phone service: Yes
// Household 2 has cell phone service: No
// Household 3 has cell phone service: Yes
//
// Household 1 has cell and land line service: Yes
// Household 2 has cell and land line service: No
// Household 3 has cell and land line service: No
//
// Household 1 has: LandLine, Cell, Internet
// Household 2 has: None
// Household 3 has: Cell, Internet
using System;
[Flags]
public enum PhoneService
{
None = 0,
LandLine = 1,
Cell = 2,
Fax = 4,
Internet = 8,
Other = 16
}
public class Example
{
public static void Main()
{
// Define three variables representing the types of phone service
// in three households.
var household1 = PhoneService.LandLine | PhoneService.Cell |
PhoneService.Internet;
var household2 = PhoneService.None;
var household3 = PhoneService.Cell | PhoneService.Internet;
// Store the variables in an array for ease of access.
PhoneService[] households = { household1, household2, household3 };
// Which households have no service?
for (int ctr = 0; ctr < households.Length; ctr++)
Console.WriteLine("Household {0} has phone service: {1}",
ctr + 1,
households[ctr] == PhoneService.None ?
"No" : "Yes");
Console.WriteLine();
// Which households have cell phone service?
for (int ctr = 0; ctr < households.Length; ctr++)
Console.WriteLine("Household {0} has cell phone service: {1}",
ctr + 1,
(households[ctr] & PhoneService.Cell) == PhoneService.Cell ?
"Yes" : "No");
Console.WriteLine();
// Which households have cell phones and land lines?
var cellAndLand = PhoneService.Cell | PhoneService.LandLine;
for (int ctr = 0; ctr < households.Length; ctr++)
Console.WriteLine("Household {0} has cell and land line service: {1}",
ctr + 1,
(households[ctr] & cellAndLand) == cellAndLand ?
"Yes" : "No");
Console.WriteLine();
// List all types of service of each household?//
for (int ctr = 0; ctr < households.Length; ctr++)
Console.WriteLine("Household {0} has: {1:G}",
ctr + 1, households[ctr]);
Console.WriteLine();
}
}
// The example displays the following output:
// Household 1 has phone service: Yes
// Household 2 has phone service: No
// Household 3 has phone service: Yes
//
// Household 1 has cell phone service: Yes
// Household 2 has cell phone service: No
// Household 3 has cell phone service: Yes
//
// Household 1 has cell and land line service: Yes
// Household 2 has cell and land line service: No
// Household 3 has cell and land line service: No
//
// Household 1 has: LandLine, Cell, Internet
// Household 2 has: None
// Household 3 has: Cell, Internet
<Flags()>
Public Enum PhoneService As Integer
None = 0
LandLine = 1
Cell = 2
Fax = 4
Internet = 8
Other = 16
End Enum
Module Example
Public Sub Main()
' Define three variables representing the types of phone service
' in three households.
Dim household1 As PhoneService = PhoneService.LandLine Or
PhoneService.Cell Or
PhoneService.Internet
Dim household2 As PhoneService = PhoneService.None
Dim household3 As PhoneService = PhoneService.Cell Or
PhoneService.Internet
' Store the variables in an array for ease of access.
Dim households() As PhoneService = { household1, household2,
household3 }
' Which households have no service?
For ctr As Integer = 0 To households.Length - 1
Console.WriteLine("Household {0} has phone service: {1}",
ctr + 1,
If(households(ctr) = PhoneService.None,
"No", "Yes"))
Next
Console.WriteLine()
' Which households have cell phone service?
For ctr As Integer = 0 To households.Length - 1
Console.WriteLine("Household {0} has cell phone service: {1}",
ctr + 1,
If((households(ctr) And PhoneService.Cell) = PhoneService.Cell,
"Yes", "No"))
Next
Console.WriteLine()
' Which households have cell phones and land lines?
Dim cellAndLand As PhoneService = PhoneService.Cell Or PhoneService.LandLine
For ctr As Integer = 0 To households.Length - 1
Console.WriteLine("Household {0} has cell and land line service: {1}",
ctr + 1,
If((households(ctr) And cellAndLand) = cellAndLand,
"Yes", "No"))
Next
Console.WriteLine()
' List all types of service of each household?'
For ctr As Integer = 0 To households.Length - 1
Console.WriteLine("Household {0} has: {1:G}",
ctr + 1, households(ctr))
Next
Console.WriteLine()
End Sub
End Module
' The example displays the following output:
' Household 1 has phone service: Yes
' Household 2 has phone service: No
' Household 3 has phone service: Yes
'
' Household 1 has cell phone service: Yes
' Household 2 has cell phone service: No
' Household 3 has cell phone service: Yes
'
' Household 1 has cell and land line service: Yes
' Household 2 has cell and land line service: No
' Household 3 has cell and land line service: No
'
' Household 1 has: LandLine, Cell, Internet
' Household 2 has: None
' Household 3 has: Cell, Internet
Açıklamalar
Bit alanları genellikle birlikte ortaya çıkabilecek öğelerin listeleri için kullanılır, ancak Numaralandırma sabitleri genellikle birbirini dışlayan öğelerin listeleri için kullanılır.Bit fields are generally used for lists of elements that might occur in combination, whereas enumeration constants are generally used for lists of mutually exclusive elements. Bu nedenle, bit alanları adlandırılmamış değerler oluşturmak için bir bit düzeyinde veya işlemle birleştirilecek şekilde tasarlanmıştır, ancak numaralandırılmış sabitler değildir.Therefore, bit fields are designed to be combined with a bitwise OR operation to generate unnamed values, whereas enumerated constants are not. Diller, numaralandırma sabitleriyle karşılaştırıldığında bit alanları kullanımıyla farklılık gösterir.Languages vary in their use of bit fields compared to enumeration constants.
FlagsAttribute öznitelikleriAttributes of the FlagsAttribute
AttributeUsageAttribute Bu sınıfa uygulanır ve Inherited özelliği belirtir false
.AttributeUsageAttribute is applied to this class, and its Inherited property specifies false
. Bu öznitelik yalnızca Numaralandırmalar için uygulanabilir.This attribute can only be applied to enumerations.
FlagsAttribute ve enum için yönergelerGuidelines for FlagsAttribute and Enum
Bir FlagsAttribute numaralandırma için özel özniteliğini yalnızca bir sayısal değerde bit düzeyinde bir işlem (ve, ya da DıŞLAMALı veya) gerçekleştirilmesi durumunda kullanın.Use the FlagsAttribute custom attribute for an enumeration only if a bitwise operation (AND, OR, EXCLUSIVE OR) is to be performed on a numeric value.
Numaralandırma sabitlerini iki, 1, 2, 4, 8, vb. üslerinde tanımlayın.Define enumeration constants in powers of two, that is, 1, 2, 4, 8, and so on. Bu, Birleşik numaralandırma sabitlerinde bireysel bayrakların çakışmayacağı anlamına gelir.This means the individual flags in combined enumeration constants do not overlap.
Yaygın olarak kullanılan bayrak birleşimleri için numaralandırılmış bir sabit oluşturmayı düşünün.Consider creating an enumerated constant for commonly used flag combinations. Örneğin, numaralandırılmış sabitleri içeren dosya g/ç işlemleri için kullanılan bir sabit listesi varsa ve
Read = 1
Write = 2
bayraklarını birleştiren numaralandırılmış sabiti oluşturmayı düşününReadWrite = Read OR Write
Read
Write
.For example, if you have an enumeration used for file I/O operations that contains the enumerated constantsRead = 1
andWrite = 2
, consider creating the enumerated constantReadWrite = Read OR Write
, which combines theRead
andWrite
flags. Ayrıca, bayrakları birleştirmek için kullanılan bit düzeyinde OR işlemi, basit görevler için gerekli olmaması gereken bazı koşullarda gelişmiş bir kavram olarak düşünülebilir.In addition, the bitwise OR operation used to combine the flags might be considered an advanced concept in some circumstances that should not be required for simple tasks.Çok sayıda bayrak konumu 1 olarak ayarlanabileceğinden, kodunuzun kafa karıştırıcı ve kodlama hatalarını önerme biçiminde negatif bir sayı olarak sayıldıysanız dikkatli olun.Use caution if you define a negative number as a flag enumerated constant because many flag positions might be set to 1, which might make your code confusing and encourage coding errors.
Sayısal değerde bir bayrağın ayarlanmış olup olmadığını test etmenin kolay bir yolu, sayısal değer içindeki tüm bitleri bayrağa karşılık gelen sıfır olarak ayarlayan ve sonra bu işlemin sonucunun numaralandırılmış sabit bayrağıyla eşit olup olmadığını test etmek için uygun bir yoldur.A convenient way to test whether a flag is set in a numeric value is to perform a bitwise AND operation between the numeric value and the flag enumerated constant, which sets all bits in the numeric value to zero that do not correspond to the flag, then test whether the result of that operation is equal to the flag enumerated constant.
None
Değeri sıfır olan numaralandırılan sabit bayrak adı olarak kullanın.UseNone
as the name of the flag enumerated constant whose value is zero.None
Sonuç her zaman sıfır olduğundan, bir bayrağı test etmek için bir bit DÜZEYINDE and işleminde numaralandırılmış sabiti kullanamazsınız.You cannot use theNone
enumerated constant in a bitwise AND operation to test for a flag because the result is always zero. Bununla birlikte, sayısal değerde birNone
bitlerin ayarlanmış olup olmadığını anlamak için sayısal değer ve numaralandırılmış sabit arasında bir mantıksal, bit düzeyinde bir karşılaştırma gerçekleştirebilirsiniz.However, you can perform a logical, not a bitwise, comparison between the numeric value and theNone
enumerated constant to determine whether any bits in the numeric value are set.Bayrak numaralandırması yerine bir değer numaralandırması oluşturursanız, numaralandırılmış bir sabit oluşturmak hala devam etmektedir
None
.If you create a value enumeration instead of a flags enumeration, it is still worthwhile to create aNone
enumerated constant. Bunun nedeni, varsayılan olarak, numaralandırma için kullanılan belleğin ortak dil çalışma zamanı tarafından sıfıra başlatılmasının bir sıdır.The reason is that by default the memory used for the enumeration is initialized to zero by the common language runtime. Sonuç olarak, değeri sıfır olan bir sabit tanımlamadıysanız, sabit listesi oluşturulduğunda geçersiz bir değer içerir.Consequently, if you do not define a constant whose value is zero, the enumeration will contain an illegal value when it is created.Uygulamanızın temsil etmesi gereken belirgin bir varsayılan durum varsa, varsayılan değeri temsil etmek için değeri sıfır olan numaralandırılmış bir sabit kullanmayı düşünün.If there is an obvious default case your application needs to represent, consider using an enumerated constant whose value is zero to represent the default. Varsayılan bir durum yoksa, değeri sıfır olan numaralandırılmış bir sabit kullanmayı düşünün ve bu durum, diğer numaralandırılmış sabitler tarafından temsil edilmez.If there is no default case, consider using an enumerated constant whose value is zero that means the case that is not represented by any of the other enumerated constants.
Yalnızca numaralandırmanın durumunu yansıtmak için bir numaralandırma değeri tanımlamayın.Do not define an enumeration value solely to mirror the state of the enumeration itself. Örneğin, yalnızca sabit listesinin sonunu işaretleyen numaralandırılmış bir sabit tanımlamayın.For example, do not define an enumerated constant that merely marks the end of the enumeration. Sabit listesinin son değerini belirlemeniz gerekiyorsa, bu değeri açık olarak denetleyin.If you need to determine the last value of the enumeration, check for that value explicitly. Ayrıca, Aralık içindeki tüm değerler geçerliyse, ilk ve son numaralandırılan sabit sabiti için bir Aralık denetimi yapabilirsiniz.In addition, you can perform a range check for the first and last enumerated constant if all values within the range are valid.
Gelecekte kullanılmak üzere ayrılmış numaralandırılmış sabitleri belirtmeyin.Do not specify enumerated constants that are reserved for future use.
Değer olarak numaralandırılmış bir sabiti alan bir yöntem veya özellik tanımladığınızda, değeri doğrulamayı düşünün.When you define a method or property that takes an enumerated constant as a value, consider validating the value. Bunun nedeni, sayısal değer numaralandırmada tanımlanmasa bile, sayısal bir değeri numaralandırma türüne çevirebilirsiniz.The reason is that you can cast a numeric value to the enumeration type even if that numeric value is not defined in the enumeration.
Oluşturucular
FlagsAttribute() |
FlagsAttribute sınıfının yeni bir örneğini başlatır.Initializes a new instance of the FlagsAttribute class. |
Özellikler
TypeId |
Türetilmiş bir sınıfta uygulandığında, bunun için benzersiz bir tanımlayıcı alır Attribute .When implemented in a derived class, gets a unique identifier for this Attribute. (Devralındığı yer: Attribute) |
Yöntemler
Equals(Object) |
Bu örneğin belirtilen bir nesneye eşit olup olmadığını gösteren bir değeri döndürür.Returns a value that indicates whether this instance is equal to a specified object. (Devralındığı yer: Attribute) |
GetHashCode() |
Bu örneğe ilişkin karma kodu döndürür.Returns the hash code for this instance. (Devralındığı yer: Attribute) |
GetType() |
TypeGeçerli örneği alır.Gets the Type of the current instance. (Devralındığı yer: Object) |
IsDefaultAttribute() |
Türetilmiş bir sınıfta geçersiz kılınırsa, bu örneğin değerinin türetilmiş sınıf için varsayılan değer olup olmadığını gösterir.When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Devralındığı yer: Attribute) |
Match(Object) |
Türetilmiş bir sınıfta geçersiz kılınırsa, bu örneğin belirtilen bir nesneye eşit olup olmadığını gösteren bir değer döndürür.When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Devralındığı yer: Attribute) |
MemberwiseClone() |
Geçerli bir basit kopyasını oluşturur Object .Creates a shallow copy of the current Object. (Devralındığı yer: Object) |
ToString() |
Geçerli nesneyi temsil eden dizeyi döndürür.Returns a string that represents the current object. (Devralındığı yer: Object) |
Belirtik Arabirim Kullanımları
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) |
Bir ad kümesini karşılık gelen bir dağıtma tanımlayıcısı kümesine eşler.Maps a set of names to a corresponding set of dispatch identifiers. (Devralındığı yer: Attribute) |
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) |
Bir arabirimin tür bilgilerini almak için kullanılabilen bir nesnenin tür bilgilerini alır.Retrieves the type information for an object, which can be used to get the type information for an interface. (Devralındığı yer: Attribute) |
_Attribute.GetTypeInfoCount(UInt32) |
Bir nesnenin sağladığı tür bilgisi arabirimlerinin sayısını alır (0 ya da 1).Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Devralındığı yer: Attribute) |
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) |
Bir nesne tarafından sunulan özelliklere ve yöntemlere erişim sağlar.Provides access to properties and methods exposed by an object. (Devralındığı yer: Attribute) |