This documentation is archived and is not being maintained.
StateBag Constructor
.NET Framework 1.1
Initializes a new instance of the StateBag class.
Overload List
Initializes a new instance of the StateBag class. This is the default constructor for this class.
[Visual Basic] Public Sub New()
[C#] public StateBag();
[C++] public: StateBag();
[JScript] public function StateBag();
Initializes a new instance of the StateBag class that allows stored state values to be case-insensitive.
[Visual Basic] Public Sub New(Boolean)
[C#] public StateBag(bool);
[C++] public: StateBag(bool);
[JScript] public function StateBag(Boolean);
Example
[Visual Basic, C#] The following example demonstrates using this version of the StateBag constructor.
[Visual Basic, C#] Note This example shows how to use one of the overloaded versions of the StateBag constructor. For other examples that might be available, see the individual overload topics.
[Visual Basic] ' Create a StateBag object to contain the view state ' associated with the custom control named myControl. Use the ' StateBag.GetEnumerator method to create an ' IDictionaryEnumerator named myDictionaryEnumerator. Dim ctlOne As New ctlViewState1() Dim myStateBag As New StateBag() myStateBag = ctlOne.GetState() Dim myDictionaryEnumerator As IDictionaryEnumerator = myStateBag.GetEnumerator() [C#] // Create a StateBag object to contain the view state // associated with the custom control named myControl. Use the // StateBag.GetEnumerator method to create an // IDictionaryEnumerator named myDictionaryEnumerator. ctlViewState1 ctlOne = new ctlViewState1(); StateBag myStateBag = new StateBag(); myStateBag = ctlOne.GetState(); IDictionaryEnumerator myDictionaryEnumerator = myStateBag.GetEnumerator();
[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button
in the upper-left corner of the page.
See Also
Show: