Gets a value indicating whether the Caption has been explicitly set.
[Visual Basic] Public Function ShouldPersistCaption() As Boolean [C#] public bool ShouldPersistCaption(); [C++] public: bool ShouldPersistCaption(); [JScript] public function ShouldPersistCaption() : Boolean;
true if the property value has been changed from its default; otherwise, false.
[Visual Basic]
Dim myColumn As DataColumn = New DataColumn ' ShouldPersistCaption returns false by default. MessageBox.Show "ShouldPersistCaption=" & myColumn.ShouldPersistCaption ' Explicitly setting Caption changes ShouldPersistCaption to true. myColumn.Caption = "New Caption" MessageBox.Show "ShouldPersistCaption=" & myColumn.ShouldPersistCaption
DataColumn Class | DataColumn Members | System.Data Namespace