This documentation is archived and is not being maintained.
SelectedDatesCollection Constructor
.NET Framework 1.1
Initializes a new instance of the SelectedDatesCollection class with the specified date list.
[Visual Basic] Public Sub New( _ ByVal dateList As ArrayList _ ) [C#] public SelectedDatesCollection( ArrayList dateList ); [C++] public: SelectedDatesCollection( ArrayList* dateList ); [JScript] public function SelectedDatesCollection( dateList : ArrayList );
Parameters
- dateList
- A System.Collections.ArrayList that represents a collection of dates.
Remarks
Use this constructor to create a new instance of the SelectedDatesCollection class.
Example
[Visual Basic, C#, C++] The following example demonstrates how to create a new instance of the SelectedDatesCollection class.
[Visual Basic] Sub Button_Click(sender As Object, e As EventArgs) ' Create ArrayList. Dim DatesArray As New ArrayList() Dim i As Integer Dim theDate As DateTime For i = 1 To 5 theDate = New DateTime(2000, 5, i) DatesArray.Add(theDate) Next i ' Create SelectedDatesCollection. Dim dates As New SelectedDatesCollection(DatesArray) End Sub [C#] void Button_Click(Object sender, EventArgs e) { // Create ArrayList. ArrayList DatesArray = new ArrayList(); for (int i = 1; i <= 5; i++) { DateTime date = new DateTime(2000, 5, i); DatesArray.Add(date); } // Create SelectedDatesCollection. SelectedDatesCollection dates = new SelectedDatesCollection(DatesArray); } [C++] void Button_Click(Object* /*sender*/, EventArgs* /*e*/) { // Create ArrayList. ArrayList* DatesArray = new ArrayList(); for (int i = 1; i <= 5; i++) { DateTime date = DateTime(2000, 5, i); DatesArray->Add(__box(date)); } // Create SelectedDatesCollection. SelectedDatesCollection* dates = new SelectedDatesCollection(DatesArray); }
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
SelectedDatesCollection Class | SelectedDatesCollection Members | System.Web.UI.WebControls Namespace | System.Collections.ArrayList
Show: