The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

DataSet.ShouldSerializeTables Method

Gets a value indicating whether Tables property should be persisted.

[Visual Basic]
Protected Overridable Function ShouldSerializeTables() As Boolean
protected virtual bool ShouldSerializeTables();
protected: virtual bool ShouldSerializeTables();
protected function ShouldSerializeTables() : Boolean;

Return Value

true if the property value has been changed from its default; otherwise, false.


You typically use this method only if you are either creating a designer for the DataSet, or creating your own control incorporating the DataSet.


[Visual Basic, C#, C++] The following example shows a class derived from the DataSet class. The ShouldSerializeTables method is called from within functions in the derived class.

[Visual Basic] 
Public Class DerivedDataSet
    Inherits System.Data.DataSet
    Public Sub ResetDataSetRelations()
        ' Check the ShouldPersistTable method before invoking Reset.
        If Not Me.ShouldSerializeTables() Then
        End If
    End Sub
End Class

public  class DerivedDataSet:System.Data.DataSet {
   public void ResetDataSetRelations(){
      // Check the ShouldPersistTable method before invoking Reset.

public  __gc class DerivedDataSet:public System::Data::DataSet {
    void ResetDataSetRelations(){
       // Check the ShouldPersistTable method before invoking Reset.

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

DataSet Class | DataSet Members | System.Data Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.