Subscription.Item Property (Int32)
Gets or sets the value of a field in the subscription record, using the field ordinal as an identifier.
Espacio de nombres: Microsoft.SqlServer.NotificationServices
Ensamblado: Microsoft.SqlServer.NotificationServices (in microsoft.sqlserver.notificationservices.dll)
Sintaxis
'Declaración
<ComVisibleAttribute(False)> _
Public Default Property Item ( _
fieldOrdinal As Integer _
) As Object
[ComVisibleAttribute(false)]
public Object this [
int fieldOrdinal
] { get; set; }
[ComVisibleAttribute(false)]
public:
property Object^ default [int] {
Object^ get (int fieldOrdinal);
void set (int fieldOrdinal, Object^ value);
}
/** @property */
public Object get_Item (int fieldOrdinal)
/** @property */
public void set_Item (int fieldOrdinal, Object value)
Parámetros
- fieldOrdinal
The zero-based ordinal of the subscription field for which you want the value returned.
Valor de propiedad
An object that represents the field's value.
Notas
This property is not available in COM interop. Because only one overload of a given property or method can be made available in COM interop, the String overload of the Item(String) property was chosen because it is more widely used.
Ejemplo
The following examples show how to use the Item(Int32) property to set a field value:
Dim instanceName As String = "MyInstanceName"
Dim applicationName As String = "MyApplicationName"
Dim subscriptionClassName As String = "MySubscriptionClassName"
'Create an NSInstance object.
Dim myInstance As New NSInstance(instanceName)
'Create an NSApplication object.
Dim myApplication As New NSApplication(myInstance, applicationName)
'Create a Subscription object.
Dim mySubscription As _
New Subscription(myApplication, subscriptionClassName)
'Use the Item property to set a field value.
mySubscription(0) = "MyValue"
string instanceName = "MyInstanceName";
string applicationName = "MyApplicationName";
string subscriptionClassName = "MySubscriptionClassName";
//Create an NSInstance object.
NSInstance myInstance = new NSInstance(instanceName);
//Create an NSApplication object.
NSApplication myApplication =
new NSApplication(myInstance, applicationName);
//Create a Subscription object.
Subscription mySubscription =
new Subscription(myApplication, subscriptionClassName);
//Use the Item property to set a field value.
mySubscription[0] = "MyFieldValue";
Seguridad para subprocesos
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Plataformas
Plataformas de desarrollo
Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.
Plataformas de destino
Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.
Vea también
Referencia
Subscription Class
Subscription Members
Microsoft.SqlServer.NotificationServices Namespace