WorksheetBase.CustomProperties Özellik
Alır bir Microsoft.Office.Interop.Excel.CustomProperties nesneyi gösteren tanımlayıcı bilgileri ilişkili bir çalışma.
Ad alanı: Microsoft.Office.Tools.Excel
Derleme: Microsoft.Office.Tools.Excel.v4.0.Utilities (Microsoft.Office.Tools.Excel.v4.0.Utilities.dll içinde)
Sözdizimi
'Bildirim
Public ReadOnly Property CustomProperties As CustomProperties
Get
public CustomProperties CustomProperties { get; }
Özellik Değeri
Tür: Microsoft.Office.Interop.Excel.CustomProperties
A Microsoft.Office.Interop.Excel.CustomProperties nesneyi gösteren tanımlayıcı bilgileri ilişkili bir çalışma.
Örnekler
Aşağıdaki kod örneği CustomProperties özelliği uyarlanmış bir özellik eklemek için "Microsoft" adlı değer "msft" ile Geçerli çalışma sayfasına. "Microsoft" bulana kadar örnek sonra özel özellikler topluluk içinde yineleme özelliği ve bu özelliğin değeri A1 hücresine ayarlar.
Bu örnek, bir belge düzeyinde özelleştirme için bulunur.
Private Sub AddStockSymbol()
Me.CustomProperties.Add("Microsoft", "MSFT")
Dim i As Integer
For i = 1 To Me.CustomProperties.Count
If Me.CustomProperties(i).Name = "Microsoft" Then
Me.Range("A1").Value2 = _
Me.CustomProperties(i).Value.ToString()
Return
End If
Next i
End Sub 'AddStockSymbol
private void AddStockSymbol()
{
this.CustomProperties.Add("Microsoft", "MSFT");
for (int i = 1; i <= this.CustomProperties.Count; i++)
{
if (this.CustomProperties.get_Item(i).Name == "Microsoft")
{
this.Range["A1", missing].Value2 =
this.CustomProperties.get_Item(i).Value.ToString();
return;
}
}
}
.NET Framework Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. kısmen güvenilir kod tarafından Kitaplıklar kullanma.