CodeProperty2.Setter Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Özelliği ayarlamak için kodu tanımlayan nesneyi alır veya ayarlar.
public:
property EnvDTE::CodeFunction ^ Setter { EnvDTE::CodeFunction ^ get(); void set(EnvDTE::CodeFunction ^ value); };
public:
property EnvDTE::CodeFunction ^ Setter { EnvDTE::CodeFunction ^ get(); void set(EnvDTE::CodeFunction ^ value); };
[System.Runtime.InteropServices.DispId(36)]
public EnvDTE.CodeFunction Setter { [System.Runtime.InteropServices.DispId(36)] [System.Runtime.InteropServices.TypeLibFunc(1024)] get; [System.Runtime.InteropServices.DispId(36)] [System.Runtime.InteropServices.TypeLibFunc(1024)] set; }
[<System.Runtime.InteropServices.DispId(36)>]
[<get: System.Runtime.InteropServices.DispId(36)>]
[<get: System.Runtime.InteropServices.TypeLibFunc(1024)>]
[<set: System.Runtime.InteropServices.DispId(36)>]
[<set: System.Runtime.InteropServices.TypeLibFunc(1024)>]
member this.Setter : EnvDTE.CodeFunction with get, set
Public Property Setter As CodeFunction
Özellik Değeri
Bir CodeFunction nesnesi.
Uygulamalar
- Öznitelikler
Örnekler
Sub SetterExample(ByVal dte As DTE2)
' Before running this example, open a code document from a project
' and place the insertion point inside a property definition.
Try
' Retrieve the CodeProperty at the insertion point.
Dim sel As TextSelection = _
CType(dte.ActiveDocument.Selection, TextSelection)
Dim prop As CodeProperty = CType(sel.ActivePoint.CodeElement( _
vsCMElement.vsCMElementProperty), CodeProperty)
' Display the source code for the property setter.
Dim sttr As CodeFunction = prop.Setter
Dim start As TextPoint = sttr.GetStartPoint()
Dim finish As TextPoint = sttr.GetEndPoint()
Dim src As String = start.CreateEditPoint().GetText(finish)
MsgBox(prop.Name & "'s setter source code:" & vbCrLf & _
vbCrLf & src)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Açıklamalar
Setter varsa, bu özelliğin Ayarlayıcısı olan kod işlevini döndürür.
Not
Sınıfların, yapıların, işlevlerin, özniteliklerin, temsilcilerin ve bu gibi kod modeli öğelerinin değerleri, belirli tür düzenlemeler yapıldıktan sonra belirleyici olmayan bir değer olabilir, yani değerlerinin her zaman aynı kalır.