C# | Visual Basic | Visual C++ | F# |
public Object this[ int field ] { get; set; }
Public Default Property Item ( field As Integer ) As Object Get Set
public: property Object^ default[int field] { Object^ get (int field); void set (int field, Object^ value); }
member Item : Object with get, set
- field (Int32)
- Specifies the field of the Record to get or set.
Record fields are indexed starting with 1. Field 0 is a special format field.
When getting a field, the type of the object returned depends on the type of the Record field. The object will be one of: Int16, Int32, String, Stream, or null. If the Record was returned from a View, the type will match that of the field from the View query. Otherwise, the type will match the type of the last value set for the field.
When setting a field, the type of the object provided will be converted to match the View query that returned the Record, or if Record was not returned from a View then the type of the object provided will determine the type of the Record field. The object should be one of: Int16, Int32, String, Stream, or null.
The type-specific getters and setters are slightly more efficient than this property, since they don't have to do the extra work to infer the value's type every time.
Win32 MSI APIs: MsiRecordGetInteger, MsiRecordGetString, MsiRecordSetInteger, MsiRecordSetString
Exception | Condition |
---|---|
ArgumentOutOfRangeException | The field is less than 0 or greater than the
number of fields in the Record. |
Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.11.1.2318)