/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
samples/snippets/visualbasic/VS_Snippets_CLR/CustomAttributeData/VB/source2.vb
30 строк
708 B
Next Turn
Format codes based on .editorconfig, Part 6 (#18869)
11 июн 2020, 17:41
Не верифицирован
11 июн 2020, 17:41
008c5b8
Код
Авторство
О чём код?
' <snippet2> Public Class ExampleAttribute Inherits Attribute Private stringVal As String Public Sub New() stringVal = "This is the default string." End Sub Public Property StringValue() As String Get Return stringVal End Get Set(Value As String) stringVal = Value End Set End Property End Class <Example(StringValue:="This is a string.")> _ Class Class1 Public Shared Sub Main() Dim info As System.Reflection.MemberInfo = GetType(Class1) For Each attrib As Object In info.GetCustomAttributes(true) Console.WriteLine(attrib) Next attrib End Sub End Class ' </snippet2>