This attribute is used to connect a property with a field in the storage.
Syntax
| Visual Basic (Declaration) | |
|---|
Public NotInheritable Class FieldAttribute
Inherits Attribute |
| C# | |
|---|
public sealed class FieldAttribute : Attribute |
| Managed Extensions for C++ | |
|---|
public __gc __sealed class FieldAttribute : public Attribute |
| C++/CLI | |
|---|
public ref class FieldAttribute sealed : public Attribute |
Example
The following example shows how to use the FieldAttribute in a persistent class.
| C# | Copy Code |
|---|
[Persistent("USER")] public class User { [Field("NAME", AllowDBNull = false)] public string Name { // ... code of the property. } [Field("ID", AllowDBNull = true, Identifier = true)] public string Id { // ... code of the property. } // ... Other code of the class. } |
Remarks
Inheritance Hierarchy
System.Object
System.Attribute
Chili.Opf3.FieldAttribute
Requirements
Namespace: Chili.Opf3
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: Chili.Opf3 (in Chili.Opf3.dll)
See Also