SlideShare a Scribd company logo
C++.NET
Windows Forms Course
L07 –Collections

Mohammad Shaker
mohammadshakergtr.wordpress.com
C++.NET Windows Forms Course
@ZGTRShaker
Welcome!
Collections?
Collections Generic
generic?
Class
Comparer<T>

Description
Provides a base class for implementations of
the IComparer<T>generic interface.

Dictionary<TKey, TValue>
Dictionary<TKey,
TValue>::KeyCollection
Dictionary<TKey,
TValue>::ValueCollection
EqualityComparer<T>

Represents a collection of keys and values.
Represents the collection of keys in a Dictionary<TKey,
TValue>. This class cannot be inherited.

HashSet<T>
KeyedByTypeCollection<TItem>
KeyNotFoundException

Represents a set of values.
Provides a collection whose items are types that serve as keys.
The exception that is thrown when the key specified for
accessing an element in a collection does not match any key in
the collection.

LinkedList<T>
LinkedListNode<T>

Represents a doubly linked list.
Represents a node in a LinkedList<T>. This class cannot be
inherited.

List<T>

Represents a strongly typed list of objects that can be
accessed by index. Provides methods to search, sort, and
manipulate lists.
Represents a first-in, first-out collection of objects.

Queue<T>

Represents the collection of values in a Dictionary<TKey,
TValue>. This class cannot be inherited.
Provides a base class for implementations of
theIEqualityComparer<T> generic interface.
SortedDictionary<TKey, TValue>

Represents a collection of key/value pairs that are sorted on
the key.

SortedDictionary<TKey,
TValue>::KeyCollection

Represents the collection of keys in a SortedDictionary<TKey,
TValue>. This class cannot be inherited.

SortedDictionary<TKey,
TValue>::ValueCollection

Represents the collection of values in
a SortedDictionary<TKey, TValue>. This class cannot be
inherited

SortedList<TKey, TValue>

Represents a collection of key/value pairs that are sorted by
key based on the associated IComparer<T> implementation.

SortedSet<T>

Represents a collection of objects that is maintained in sorted
order.
Represents a variable size last-in-first-out (LIFO) collection of
instances of the same arbitrary type.

Stack<T>

SynchronizedCollection<T>

Provides a thread-safe collection that contains objects of a
type specified by the generic parameter as elements.

SynchronizedKeyedCollection<K, T>

Provides a thread-safe collection that contains objects of a
type specified by a generic parameter and that are grouped by
keys.

SynchronizedReadOnlyCollection<T>

Provides a thread-safe, read-only collection that contains
objects of a type specified by the generic parameter as
elements.
Peak on Collections
private : System::Collections::Generic::LinkedList <String ^> ^MyStrList ;
private : System::Collections::Generic::List<TextBox ^> ^List ;
private : System::Collections::Generic::Stack <String ^> ^ MyStack;
private : System::Collections::ArrayList ^MyArrayList ;
Peak on Collections
private : System::Collections::Generic::Stack < String ^> ^MyStack;

private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e)
{
MyStack = gcnew System::Collections::Generic::Stack < String ^>;
}
Peak on Collections
• Let’s have the following!
private : System::Collections::Generic::LinkedList <Button^> ^MyList;

private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e)
{
MyList = gcnew System::Collections::Generic:: LinkedList <Button ^>;
}
Peak on Collections
private : System::Collections::Generic::LinkedList < String ^> ^MyList;
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^
e)
{
MyList = gcnew System::Collections::Generic::LinkedList < String ^>;
}

private: System::Void button1_Click_1(System::Object^
System::EventArgs^ e)
{
MyList->AddLast(“MeMe");
MyList->AddLast(“MeMa");
}

sender,
Peak on Collections
• What’s wrong?
private : System::Collections::Generic::LinkedList < String ^> ^MyList;
private: System::Void button1_Click_1(System::Object^
System::EventArgs^ e)
{
MyList->AddLast(“MeMe");
MyList->AddLast(“MeMa");
}
Runtime error. the LinkedList is still NULL

sender,
Peak on Collections
• “for each” loop
private: System::Void button1_Click_1(System::Object^ sender,
System::EventArgs^ e)
{
for each (String ^str in MyList)
{
textBox1->Text += str + Environment::NewLine ;
}
}
private : System::Collections::Generic::LinkedList < String ^> ^MyList;
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^
e)
{
MyList = gcnew System::Collections::Generic::LinkedList < String ^>;
}
private: System::Void button1_Click_1(System::Object^
System::EventArgs^ e)
{
MyList->AddLast(textBox1->Text);
}

sender,

private: System::Void button1_Click_2(System::Object^ sender,
System::EventArgs^ e)
{
for each (String ^str in MyList)
{
textBox1->Text += str + Environment::NewLine ;
}
}
private : System::Collections::Generic::LinkedList < Button^> ^MyList;
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^
e)
{
MyList = gcnew System::Collections::Generic::LinkedList < Button ^>;
}
private: System::Void button1_Click_1(System::Object^
System::EventArgs^ e)
{
Button ^B1 = gcnew Button ;
MyList->AddLast(B1);
}

sender,

private: System::Void button1_Click_2(System::Object^ sender,
System::EventArgs^ e)
{
static int Counter = 1 ;
for each (Button ^B in MyList)
{
B->Text = “Button” + Counter.ToString();
B->Height = 30 ; B->Width = 50 ;
Counter++ ;
}
}
Peak on Collections
• Needs to be static?
private: System::Void button1_Click_2(System::Object^ sender,
System::EventArgs^ e)
{
int Counter = 1 ;
for each (Button ^B in MyList)
{
B->Text = “Button” + Counter.ToString();
B->Height = 30 ; B->Width = 50 ;
Counter++ ;
}
}
Peak on Collections - List
private: System::Collections::Generic::List<String^> ^MyList ;

private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyList = gcnew
System::Collections::Generic::List<String^> (4) ;
MyList->Add("Z") ;
MyList->Add("G") ;
MyList->Add("T") ;
MyList->Add("R") ;
}
private: System::Void button1_Click_1(System::Object^
sender, System::EventArgs^ e)
{
for each (String ^str in MyList)
{
textBox1->Text += str + " " ;
}
}
List
List
private: System::Collections::Generic::List<String^> ^MyList ;

private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyList = gcnew System::Collections::Generic::List<String^> (4) ;
MyList->Add("Z") ;
MyList->Add("G") ;
MyList->Add("T") ;
MyList->Add("R") ;
}
private: System::Void button1_Click_1(System::Object^ sender,
System::EventArgs^ e)
{
for(int i=0; i<4 ; i++)
{
textBox1->Text += MyList[i] + " ";
}
}
List
List
private: System::Collections::Generic::List<String^> ^MyList ;

private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyList = gcnew
System::Collections::Generic::List<String^> (4) ;
MyList[0] = “Z” ;
MyList[1] = “G” ;
MyList[2] = “T” ;
MyList[3] = “R” ;
}
private: System::Void button1_Click_1(System::Object^
sender, System::EventArgs^ e)
{
for(int i=0; i<4 ; i++)
{
textBox1->Text += MyList[i] + " ";
}
}
Peak on Collections – ArrayList
private: System::Collections::ArrayList ^MyArrayList ;
private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1 = gcnew Button ;
TextBox ^T1 ;
// Not initialized
String ^S = "ZGTR";
int i ;
// Not initialized
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
}
Everything is good
Peak on Collections – ArrayList
private: System::Collections::ArrayList ^MyArrayList ;
private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1,^B2= gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
MyArrayList[0] = B2 ;
MyArrayList[3] = 6 ;
}

Everything is good
Peak on Collections – ArrayList
private: System::Collections::ArrayList ^MyArrayList ;
private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1,^B2= gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
MyArrayList[0] = B2 ;
MyArrayList[3] = B2 ; // Here!
}

Everything is good
Peak on Collections – ArrayList
private: System::Collections::ArrayList ^MyArrayList ;
private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1,^B2= gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
MyArrayList[0] = 6;
// Here!
MyArrayList[3] = B2 ; // Here!
}

Everything is good
Peak on Collections – ArrayList
private: System::Collections::ArrayList ^MyArrayList ;
private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1,^B2= gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
B1->Height = 50 ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
MyArrayList[0] = B2 ;
MyArrayList[3] = 6 ;
}

Compiler error. No new for Button1
Peak on Collections – ArrayList
private: System::Collections::ArrayList ^MyArrayList ;
private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1,^B2= gcnew Button ;
B1 = gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
B1->Height = 50 ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
MyArrayList[0] = B2 ;
MyArrayList[3] = 6 ;
}

Everything is good
Peak on Collections – ArrayList
private: System::Collections::ArrayList ^MyArrayList ;
private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1,^B2= gcnew Button ;
B1 = gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
B1->Height = 50 ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
MyArrayList[0] = B2 ;
MyArrayList[4] = 6 ;
}

Compiler error. index = 4! Wrong!
Peak on Collections – ArrayList
private: System::Collections::ArrayList ^MyArrayList ;
private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1,^B2= gcnew Button ;
B1 = gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
B1->Height = 50 ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
B2 = MyArrayList[0] ; // 1
MyArrayList[3] = 6 ;
}

Compiler error. object^ and Button^ in 1
Peak on Collections – ArrayList
private: System::Collections::ArrayList ^MyArrayList ;
private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1 = gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
}
Everything is good
Peak on Collections – ArrayList
private: System::Collections::ArrayList ^MyArrayList ;

private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1 = gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
}
private: System::Void button1_Click_1(System::Object^
System::EventArgs^ e)
{
textBox1->Text =MyArrayList[0] ->Height ;
}

Compile error

sender,
Peak on Collections – ArrayList
private: System::Collections::ArrayList ^MyArrayList ;

private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1 = gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
}
private: System::Void button1_Click_1(System::Object^ sender,
System::EventArgs^ e)
{
textBox1->Text =(MyArrayList[0]->Height)->ToString() ;
}

Compile error
Peak on Collections – ArrayList
private: System::Collections::ArrayList ^MyArrayList ;

private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1 = gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
}
private: System::Void button1_Click_1(System::Object^ sender,
System::EventArgs^ e)
{
textBox1->Text =(MyArrayList[0]->Height).ToString() ;
}

Compile error
ArrayList - dynamic_cast
private: System::Collections::ArrayList ^MyArrayList ;

private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1 = gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
}
private: System::Void button1_Click_1(System::Object^ sender,
System::EventArgs^ e)
{
textBox1->Text =((dynamic_cast <Button^>(MyArrayList[0]))->Height).ToString();
}

Everything is good. And will print 23. but why?
ArrayList - dynamic_cast
private: System::Collections::ArrayList ^MyArrayList ;
private: System::Void Form1_Load(System::Object^ sender,
System::EventArgs^ e)
{
MyArrayList = gcnew System::Collections::ArrayList (4) ;
static int Counter = 0 ;
Button ^B1 = gcnew Button ;
TextBox ^T1 ;
String ^S = "ZGTR";
int i ;
B1->Height = 30 ;
MyArrayList->Add(B1) ;
MyArrayList->Add(T1) ;
MyArrayList->Add(S) ;
MyArrayList->Add(i) ;
}

private: System::Void button1_Click_1(System::Object^ sender,
System::EventArgs^ e)
{
textBox1->Text =((dynamic_cast <Button^>(MyArrayList[0]))->Height).ToString();
}

Everything is good. And will print 30.
ArrayList
• It’s not a Generic*
– private: System::Collections::ArrayList ^MyArrayList ;

• Drop in performance!

_____________________________________________________
*Generic : class Typed
Enough said,
let’s dig deep live
That’s it for today!

More Related Content

What's hot

The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 7 of 181
The Ring programming language version 1.5.2 book - Part 7 of 181The Ring programming language version 1.5.2 book - Part 7 of 181
The Ring programming language version 1.5.2 book - Part 7 of 181
Mahmoud Samir Fayed
 
Poor Man's Functional Programming
Poor Man's Functional ProgrammingPoor Man's Functional Programming
Poor Man's Functional ProgrammingDmitry Buzdin
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
The Ring programming language version 1.5.3 book - Part 7 of 184
The Ring programming language version 1.5.3 book - Part 7 of 184The Ring programming language version 1.5.3 book - Part 7 of 184
The Ring programming language version 1.5.3 book - Part 7 of 184
Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.3 book - Part 5 of 88The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.3 book - Part 5 of 88
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 6 of 180
The Ring programming language version 1.5.1 book - Part 6 of 180The Ring programming language version 1.5.1 book - Part 6 of 180
The Ring programming language version 1.5.1 book - Part 6 of 180
Mahmoud Samir Fayed
 
Presentation new
Presentation newPresentation new
Presentation new
Diwakar raja
 
C# Starter L04-Collections
C# Starter L04-CollectionsC# Starter L04-Collections
C# Starter L04-CollectionsMohammad Shaker
 
C# Starter L02-Classes and Objects
C# Starter L02-Classes and ObjectsC# Starter L02-Classes and Objects
C# Starter L02-Classes and ObjectsMohammad Shaker
 
(674335607) cs2309 java-lab-manual
(674335607) cs2309 java-lab-manual(674335607) cs2309 java-lab-manual
(674335607) cs2309 java-lab-manual
Chandrapriya Jayabal
 
Lesson11
Lesson11Lesson11
Lesson11
Alex Honcharuk
 
VB Dot net
VB Dot net VB Dot net
VB Dot net
Akber Khowaja
 
Collection
CollectionCollection
Collection
Gayathri Ganesh
 
Java Programming - 06 java file io
Java Programming - 06 java file ioJava Programming - 06 java file io
Java Programming - 06 java file io
Danairat Thanabodithammachari
 
The Ring programming language version 1.5.1 book - Part 13 of 180
The Ring programming language version 1.5.1 book - Part 13 of 180The Ring programming language version 1.5.1 book - Part 13 of 180
The Ring programming language version 1.5.1 book - Part 13 of 180
Mahmoud Samir Fayed
 
Introduction to Python programming
Introduction to Python programmingIntroduction to Python programming
Introduction to Python programming
Damian T. Gordon
 
Collectors in the Wild
Collectors in the WildCollectors in the Wild
Collectors in the Wild
José Paumard
 

What's hot (20)

The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84
 
The Ring programming language version 1.5.2 book - Part 7 of 181
The Ring programming language version 1.5.2 book - Part 7 of 181The Ring programming language version 1.5.2 book - Part 7 of 181
The Ring programming language version 1.5.2 book - Part 7 of 181
 
Poor Man's Functional Programming
Poor Man's Functional ProgrammingPoor Man's Functional Programming
Poor Man's Functional Programming
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
The Ring programming language version 1.5.3 book - Part 7 of 184
The Ring programming language version 1.5.3 book - Part 7 of 184The Ring programming language version 1.5.3 book - Part 7 of 184
The Ring programming language version 1.5.3 book - Part 7 of 184
 
The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.3 book - Part 5 of 88The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.3 book - Part 5 of 88
 
Colegio municipal
Colegio municipalColegio municipal
Colegio municipal
 
Dill
DillDill
Dill
 
The Ring programming language version 1.5.1 book - Part 6 of 180
The Ring programming language version 1.5.1 book - Part 6 of 180The Ring programming language version 1.5.1 book - Part 6 of 180
The Ring programming language version 1.5.1 book - Part 6 of 180
 
Presentation new
Presentation newPresentation new
Presentation new
 
C# Starter L04-Collections
C# Starter L04-CollectionsC# Starter L04-Collections
C# Starter L04-Collections
 
C# Starter L02-Classes and Objects
C# Starter L02-Classes and ObjectsC# Starter L02-Classes and Objects
C# Starter L02-Classes and Objects
 
(674335607) cs2309 java-lab-manual
(674335607) cs2309 java-lab-manual(674335607) cs2309 java-lab-manual
(674335607) cs2309 java-lab-manual
 
Lesson11
Lesson11Lesson11
Lesson11
 
VB Dot net
VB Dot net VB Dot net
VB Dot net
 
Collection
CollectionCollection
Collection
 
Java Programming - 06 java file io
Java Programming - 06 java file ioJava Programming - 06 java file io
Java Programming - 06 java file io
 
The Ring programming language version 1.5.1 book - Part 13 of 180
The Ring programming language version 1.5.1 book - Part 13 of 180The Ring programming language version 1.5.1 book - Part 13 of 180
The Ring programming language version 1.5.1 book - Part 13 of 180
 
Introduction to Python programming
Introduction to Python programmingIntroduction to Python programming
Introduction to Python programming
 
Collectors in the Wild
Collectors in the WildCollectors in the Wild
Collectors in the Wild
 

Similar to C++ Windows Forms L07 - Collections

F sharp lists & dictionary
F sharp   lists &  dictionaryF sharp   lists &  dictionary
F sharp lists & dictionary
DrRajeshreeKhande
 
COLLECTIONS.pptx
COLLECTIONS.pptxCOLLECTIONS.pptx
COLLECTIONS.pptx
SruthyPJ
 
JAVA PROGRAMMING - The Collections Framework
JAVA PROGRAMMING - The Collections Framework JAVA PROGRAMMING - The Collections Framework
JAVA PROGRAMMING - The Collections Framework
Jyothishmathi Institute of Technology and Science Karimnagar
 
07 java collection
07 java collection07 java collection
07 java collection
Abhishek Khune
 
Collections generic
Collections genericCollections generic
Collections generic
sandhish
 
collections
collectionscollections
collections
javeed_mhd
 
collectionframework-141116005344-conversion-gate01.pptx
collectionframework-141116005344-conversion-gate01.pptxcollectionframework-141116005344-conversion-gate01.pptx
collectionframework-141116005344-conversion-gate01.pptx
hemanth248901
 
javacollections.pdf
javacollections.pdfjavacollections.pdf
javacollections.pdf
ManojKandhasamy1
 
The Ring programming language version 1.3 book - Part 13 of 88
The Ring programming language version 1.3 book - Part 13 of 88The Ring programming language version 1.3 book - Part 13 of 88
The Ring programming language version 1.3 book - Part 13 of 88
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 30 of 212
The Ring programming language version 1.10 book - Part 30 of 212The Ring programming language version 1.10 book - Part 30 of 212
The Ring programming language version 1.10 book - Part 30 of 212
Mahmoud Samir Fayed
 
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup GroupJava 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Henri Tremblay
 
collections
 collections collections
Generic Programming &amp; Collection
Generic Programming &amp; CollectionGeneric Programming &amp; Collection
Generic Programming &amp; Collection
Arya
 
Generic Programming &amp; Collection
Generic Programming &amp; CollectionGeneric Programming &amp; Collection
Generic Programming &amp; Collection
Arya
 
List in java
List in javaList in java
List in java
nitin kumar
 
Lambdas and Generics (long version) - Bordeaux/Toulouse JUG
Lambdas and Generics (long version) - Bordeaux/Toulouse JUGLambdas and Generics (long version) - Bordeaux/Toulouse JUG
Lambdas and Generics (long version) - Bordeaux/Toulouse JUG
Henri Tremblay
 
BackgroundIn many applications, the composition of a collection o.pdf
BackgroundIn many applications, the composition of a collection o.pdfBackgroundIn many applications, the composition of a collection o.pdf
BackgroundIn many applications, the composition of a collection o.pdf
mayorothenguyenhob69
 
The Ring programming language version 1.5.3 book - Part 22 of 184
The Ring programming language version 1.5.3 book - Part 22 of 184The Ring programming language version 1.5.3 book - Part 22 of 184
The Ring programming language version 1.5.3 book - Part 22 of 184
Mahmoud Samir Fayed
 

Similar to C++ Windows Forms L07 - Collections (20)

F sharp lists & dictionary
F sharp   lists &  dictionaryF sharp   lists &  dictionary
F sharp lists & dictionary
 
COLLECTIONS.pptx
COLLECTIONS.pptxCOLLECTIONS.pptx
COLLECTIONS.pptx
 
JAVA PROGRAMMING - The Collections Framework
JAVA PROGRAMMING - The Collections Framework JAVA PROGRAMMING - The Collections Framework
JAVA PROGRAMMING - The Collections Framework
 
07 java collection
07 java collection07 java collection
07 java collection
 
Collections generic
Collections genericCollections generic
Collections generic
 
collections
collectionscollections
collections
 
collectionframework-141116005344-conversion-gate01.pptx
collectionframework-141116005344-conversion-gate01.pptxcollectionframework-141116005344-conversion-gate01.pptx
collectionframework-141116005344-conversion-gate01.pptx
 
javacollections.pdf
javacollections.pdfjavacollections.pdf
javacollections.pdf
 
The Ring programming language version 1.3 book - Part 13 of 88
The Ring programming language version 1.3 book - Part 13 of 88The Ring programming language version 1.3 book - Part 13 of 88
The Ring programming language version 1.3 book - Part 13 of 88
 
The Ring programming language version 1.10 book - Part 30 of 212
The Ring programming language version 1.10 book - Part 30 of 212The Ring programming language version 1.10 book - Part 30 of 212
The Ring programming language version 1.10 book - Part 30 of 212
 
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup GroupJava 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
 
collections
 collections collections
collections
 
Generic Programming &amp; Collection
Generic Programming &amp; CollectionGeneric Programming &amp; Collection
Generic Programming &amp; Collection
 
Generic Programming &amp; Collection
Generic Programming &amp; CollectionGeneric Programming &amp; Collection
Generic Programming &amp; Collection
 
List in java
List in javaList in java
List in java
 
Lambdas and Generics (long version) - Bordeaux/Toulouse JUG
Lambdas and Generics (long version) - Bordeaux/Toulouse JUGLambdas and Generics (long version) - Bordeaux/Toulouse JUG
Lambdas and Generics (long version) - Bordeaux/Toulouse JUG
 
BackgroundIn many applications, the composition of a collection o.pdf
BackgroundIn many applications, the composition of a collection o.pdfBackgroundIn many applications, the composition of a collection o.pdf
BackgroundIn many applications, the composition of a collection o.pdf
 
Presentation1
Presentation1Presentation1
Presentation1
 
Collections
CollectionsCollections
Collections
 
The Ring programming language version 1.5.3 book - Part 22 of 184
The Ring programming language version 1.5.3 book - Part 22 of 184The Ring programming language version 1.5.3 book - Part 22 of 184
The Ring programming language version 1.5.3 book - Part 22 of 184
 

More from Mohammad Shaker

12 Rules You Should to Know as a Syrian Graduate
12 Rules You Should to Know as a Syrian Graduate12 Rules You Should to Know as a Syrian Graduate
12 Rules You Should to Know as a Syrian Graduate
Mohammad Shaker
 
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]
Mohammad Shaker
 
Interaction Design L06 - Tricks with Psychology
Interaction Design L06 - Tricks with PsychologyInteraction Design L06 - Tricks with Psychology
Interaction Design L06 - Tricks with Psychology
Mohammad Shaker
 
Short, Matters, Love - Passioneers Event 2015
Short, Matters, Love -  Passioneers Event 2015Short, Matters, Love -  Passioneers Event 2015
Short, Matters, Love - Passioneers Event 2015
Mohammad Shaker
 
Unity L01 - Game Development
Unity L01 - Game DevelopmentUnity L01 - Game Development
Unity L01 - Game Development
Mohammad Shaker
 
Android L07 - Touch, Screen and Wearables
Android L07 - Touch, Screen and WearablesAndroid L07 - Touch, Screen and Wearables
Android L07 - Touch, Screen and Wearables
Mohammad Shaker
 
Interaction Design L03 - Color
Interaction Design L03 - ColorInteraction Design L03 - Color
Interaction Design L03 - Color
Mohammad Shaker
 
Interaction Design L05 - Typography
Interaction Design L05 - TypographyInteraction Design L05 - Typography
Interaction Design L05 - Typography
Mohammad Shaker
 
Interaction Design L04 - Materialise and Coupling
Interaction Design L04 - Materialise and CouplingInteraction Design L04 - Materialise and Coupling
Interaction Design L04 - Materialise and Coupling
Mohammad Shaker
 
Android L05 - Storage
Android L05 - StorageAndroid L05 - Storage
Android L05 - Storage
Mohammad Shaker
 
Android L04 - Notifications and Threading
Android L04 - Notifications and ThreadingAndroid L04 - Notifications and Threading
Android L04 - Notifications and Threading
Mohammad Shaker
 
Android L09 - Windows Phone and iOS
Android L09 - Windows Phone and iOSAndroid L09 - Windows Phone and iOS
Android L09 - Windows Phone and iOS
Mohammad Shaker
 
Interaction Design L01 - Mobile Constraints
Interaction Design L01 - Mobile ConstraintsInteraction Design L01 - Mobile Constraints
Interaction Design L01 - Mobile Constraints
Mohammad Shaker
 
Interaction Design L02 - Pragnanz and Grids
Interaction Design L02 - Pragnanz and GridsInteraction Design L02 - Pragnanz and Grids
Interaction Design L02 - Pragnanz and Grids
Mohammad Shaker
 
Android L10 - Stores and Gaming
Android L10 - Stores and GamingAndroid L10 - Stores and Gaming
Android L10 - Stores and Gaming
Mohammad Shaker
 
Android L06 - Cloud / Parse
Android L06 - Cloud / ParseAndroid L06 - Cloud / Parse
Android L06 - Cloud / Parse
Mohammad Shaker
 
Android L08 - Google Maps and Utilities
Android L08 - Google Maps and UtilitiesAndroid L08 - Google Maps and Utilities
Android L08 - Google Maps and Utilities
Mohammad Shaker
 
Android L03 - Styles and Themes
Android L03 - Styles and Themes Android L03 - Styles and Themes
Android L03 - Styles and Themes
Mohammad Shaker
 
Android L02 - Activities and Adapters
Android L02 - Activities and AdaptersAndroid L02 - Activities and Adapters
Android L02 - Activities and Adapters
Mohammad Shaker
 
Android L01 - Warm Up
Android L01 - Warm UpAndroid L01 - Warm Up
Android L01 - Warm Up
Mohammad Shaker
 

More from Mohammad Shaker (20)

12 Rules You Should to Know as a Syrian Graduate
12 Rules You Should to Know as a Syrian Graduate12 Rules You Should to Know as a Syrian Graduate
12 Rules You Should to Know as a Syrian Graduate
 
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]
 
Interaction Design L06 - Tricks with Psychology
Interaction Design L06 - Tricks with PsychologyInteraction Design L06 - Tricks with Psychology
Interaction Design L06 - Tricks with Psychology
 
Short, Matters, Love - Passioneers Event 2015
Short, Matters, Love -  Passioneers Event 2015Short, Matters, Love -  Passioneers Event 2015
Short, Matters, Love - Passioneers Event 2015
 
Unity L01 - Game Development
Unity L01 - Game DevelopmentUnity L01 - Game Development
Unity L01 - Game Development
 
Android L07 - Touch, Screen and Wearables
Android L07 - Touch, Screen and WearablesAndroid L07 - Touch, Screen and Wearables
Android L07 - Touch, Screen and Wearables
 
Interaction Design L03 - Color
Interaction Design L03 - ColorInteraction Design L03 - Color
Interaction Design L03 - Color
 
Interaction Design L05 - Typography
Interaction Design L05 - TypographyInteraction Design L05 - Typography
Interaction Design L05 - Typography
 
Interaction Design L04 - Materialise and Coupling
Interaction Design L04 - Materialise and CouplingInteraction Design L04 - Materialise and Coupling
Interaction Design L04 - Materialise and Coupling
 
Android L05 - Storage
Android L05 - StorageAndroid L05 - Storage
Android L05 - Storage
 
Android L04 - Notifications and Threading
Android L04 - Notifications and ThreadingAndroid L04 - Notifications and Threading
Android L04 - Notifications and Threading
 
Android L09 - Windows Phone and iOS
Android L09 - Windows Phone and iOSAndroid L09 - Windows Phone and iOS
Android L09 - Windows Phone and iOS
 
Interaction Design L01 - Mobile Constraints
Interaction Design L01 - Mobile ConstraintsInteraction Design L01 - Mobile Constraints
Interaction Design L01 - Mobile Constraints
 
Interaction Design L02 - Pragnanz and Grids
Interaction Design L02 - Pragnanz and GridsInteraction Design L02 - Pragnanz and Grids
Interaction Design L02 - Pragnanz and Grids
 
Android L10 - Stores and Gaming
Android L10 - Stores and GamingAndroid L10 - Stores and Gaming
Android L10 - Stores and Gaming
 
Android L06 - Cloud / Parse
Android L06 - Cloud / ParseAndroid L06 - Cloud / Parse
Android L06 - Cloud / Parse
 
Android L08 - Google Maps and Utilities
Android L08 - Google Maps and UtilitiesAndroid L08 - Google Maps and Utilities
Android L08 - Google Maps and Utilities
 
Android L03 - Styles and Themes
Android L03 - Styles and Themes Android L03 - Styles and Themes
Android L03 - Styles and Themes
 
Android L02 - Activities and Adapters
Android L02 - Activities and AdaptersAndroid L02 - Activities and Adapters
Android L02 - Activities and Adapters
 
Android L01 - Warm Up
Android L01 - Warm UpAndroid L01 - Warm Up
Android L01 - Warm Up
 

Recently uploaded

Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 

Recently uploaded (20)

Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 

C++ Windows Forms L07 - Collections

  • 1. C++.NET Windows Forms Course L07 –Collections Mohammad Shaker mohammadshakergtr.wordpress.com C++.NET Windows Forms Course @ZGTRShaker
  • 5. Class Comparer<T> Description Provides a base class for implementations of the IComparer<T>generic interface. Dictionary<TKey, TValue> Dictionary<TKey, TValue>::KeyCollection Dictionary<TKey, TValue>::ValueCollection EqualityComparer<T> Represents a collection of keys and values. Represents the collection of keys in a Dictionary<TKey, TValue>. This class cannot be inherited. HashSet<T> KeyedByTypeCollection<TItem> KeyNotFoundException Represents a set of values. Provides a collection whose items are types that serve as keys. The exception that is thrown when the key specified for accessing an element in a collection does not match any key in the collection. LinkedList<T> LinkedListNode<T> Represents a doubly linked list. Represents a node in a LinkedList<T>. This class cannot be inherited. List<T> Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists. Represents a first-in, first-out collection of objects. Queue<T> Represents the collection of values in a Dictionary<TKey, TValue>. This class cannot be inherited. Provides a base class for implementations of theIEqualityComparer<T> generic interface.
  • 6. SortedDictionary<TKey, TValue> Represents a collection of key/value pairs that are sorted on the key. SortedDictionary<TKey, TValue>::KeyCollection Represents the collection of keys in a SortedDictionary<TKey, TValue>. This class cannot be inherited. SortedDictionary<TKey, TValue>::ValueCollection Represents the collection of values in a SortedDictionary<TKey, TValue>. This class cannot be inherited SortedList<TKey, TValue> Represents a collection of key/value pairs that are sorted by key based on the associated IComparer<T> implementation. SortedSet<T> Represents a collection of objects that is maintained in sorted order. Represents a variable size last-in-first-out (LIFO) collection of instances of the same arbitrary type. Stack<T> SynchronizedCollection<T> Provides a thread-safe collection that contains objects of a type specified by the generic parameter as elements. SynchronizedKeyedCollection<K, T> Provides a thread-safe collection that contains objects of a type specified by a generic parameter and that are grouped by keys. SynchronizedReadOnlyCollection<T> Provides a thread-safe, read-only collection that contains objects of a type specified by the generic parameter as elements.
  • 7. Peak on Collections private : System::Collections::Generic::LinkedList <String ^> ^MyStrList ; private : System::Collections::Generic::List<TextBox ^> ^List ; private : System::Collections::Generic::Stack <String ^> ^ MyStack; private : System::Collections::ArrayList ^MyArrayList ;
  • 8. Peak on Collections private : System::Collections::Generic::Stack < String ^> ^MyStack; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyStack = gcnew System::Collections::Generic::Stack < String ^>; }
  • 9. Peak on Collections • Let’s have the following! private : System::Collections::Generic::LinkedList <Button^> ^MyList; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyList = gcnew System::Collections::Generic:: LinkedList <Button ^>; }
  • 10.
  • 11. Peak on Collections private : System::Collections::Generic::LinkedList < String ^> ^MyList; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyList = gcnew System::Collections::Generic::LinkedList < String ^>; } private: System::Void button1_Click_1(System::Object^ System::EventArgs^ e) { MyList->AddLast(“MeMe"); MyList->AddLast(“MeMa"); } sender,
  • 12. Peak on Collections • What’s wrong? private : System::Collections::Generic::LinkedList < String ^> ^MyList; private: System::Void button1_Click_1(System::Object^ System::EventArgs^ e) { MyList->AddLast(“MeMe"); MyList->AddLast(“MeMa"); } Runtime error. the LinkedList is still NULL sender,
  • 13. Peak on Collections • “for each” loop private: System::Void button1_Click_1(System::Object^ sender, System::EventArgs^ e) { for each (String ^str in MyList) { textBox1->Text += str + Environment::NewLine ; } }
  • 14. private : System::Collections::Generic::LinkedList < String ^> ^MyList; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyList = gcnew System::Collections::Generic::LinkedList < String ^>; } private: System::Void button1_Click_1(System::Object^ System::EventArgs^ e) { MyList->AddLast(textBox1->Text); } sender, private: System::Void button1_Click_2(System::Object^ sender, System::EventArgs^ e) { for each (String ^str in MyList) { textBox1->Text += str + Environment::NewLine ; } }
  • 15. private : System::Collections::Generic::LinkedList < Button^> ^MyList; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyList = gcnew System::Collections::Generic::LinkedList < Button ^>; } private: System::Void button1_Click_1(System::Object^ System::EventArgs^ e) { Button ^B1 = gcnew Button ; MyList->AddLast(B1); } sender, private: System::Void button1_Click_2(System::Object^ sender, System::EventArgs^ e) { static int Counter = 1 ; for each (Button ^B in MyList) { B->Text = “Button” + Counter.ToString(); B->Height = 30 ; B->Width = 50 ; Counter++ ; } }
  • 16. Peak on Collections • Needs to be static? private: System::Void button1_Click_2(System::Object^ sender, System::EventArgs^ e) { int Counter = 1 ; for each (Button ^B in MyList) { B->Text = “Button” + Counter.ToString(); B->Height = 30 ; B->Width = 50 ; Counter++ ; } }
  • 17. Peak on Collections - List private: System::Collections::Generic::List<String^> ^MyList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyList = gcnew System::Collections::Generic::List<String^> (4) ; MyList->Add("Z") ; MyList->Add("G") ; MyList->Add("T") ; MyList->Add("R") ; } private: System::Void button1_Click_1(System::Object^ sender, System::EventArgs^ e) { for each (String ^str in MyList) { textBox1->Text += str + " " ; } }
  • 18. List
  • 19. List private: System::Collections::Generic::List<String^> ^MyList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyList = gcnew System::Collections::Generic::List<String^> (4) ; MyList->Add("Z") ; MyList->Add("G") ; MyList->Add("T") ; MyList->Add("R") ; } private: System::Void button1_Click_1(System::Object^ sender, System::EventArgs^ e) { for(int i=0; i<4 ; i++) { textBox1->Text += MyList[i] + " "; } }
  • 20. List
  • 21. List private: System::Collections::Generic::List<String^> ^MyList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyList = gcnew System::Collections::Generic::List<String^> (4) ; MyList[0] = “Z” ; MyList[1] = “G” ; MyList[2] = “T” ; MyList[3] = “R” ; } private: System::Void button1_Click_1(System::Object^ sender, System::EventArgs^ e) { for(int i=0; i<4 ; i++) { textBox1->Text += MyList[i] + " "; } }
  • 22. Peak on Collections – ArrayList private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1 = gcnew Button ; TextBox ^T1 ; // Not initialized String ^S = "ZGTR"; int i ; // Not initialized MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; } Everything is good
  • 23. Peak on Collections – ArrayList private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1,^B2= gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; MyArrayList[0] = B2 ; MyArrayList[3] = 6 ; } Everything is good
  • 24. Peak on Collections – ArrayList private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1,^B2= gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; MyArrayList[0] = B2 ; MyArrayList[3] = B2 ; // Here! } Everything is good
  • 25. Peak on Collections – ArrayList private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1,^B2= gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; MyArrayList[0] = 6; // Here! MyArrayList[3] = B2 ; // Here! } Everything is good
  • 26. Peak on Collections – ArrayList private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1,^B2= gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; B1->Height = 50 ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; MyArrayList[0] = B2 ; MyArrayList[3] = 6 ; } Compiler error. No new for Button1
  • 27. Peak on Collections – ArrayList private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1,^B2= gcnew Button ; B1 = gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; B1->Height = 50 ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; MyArrayList[0] = B2 ; MyArrayList[3] = 6 ; } Everything is good
  • 28. Peak on Collections – ArrayList private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1,^B2= gcnew Button ; B1 = gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; B1->Height = 50 ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; MyArrayList[0] = B2 ; MyArrayList[4] = 6 ; } Compiler error. index = 4! Wrong!
  • 29. Peak on Collections – ArrayList private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1,^B2= gcnew Button ; B1 = gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; B1->Height = 50 ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; B2 = MyArrayList[0] ; // 1 MyArrayList[3] = 6 ; } Compiler error. object^ and Button^ in 1
  • 30. Peak on Collections – ArrayList private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1 = gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; } Everything is good
  • 31. Peak on Collections – ArrayList private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1 = gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; } private: System::Void button1_Click_1(System::Object^ System::EventArgs^ e) { textBox1->Text =MyArrayList[0] ->Height ; } Compile error sender,
  • 32. Peak on Collections – ArrayList private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1 = gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; } private: System::Void button1_Click_1(System::Object^ sender, System::EventArgs^ e) { textBox1->Text =(MyArrayList[0]->Height)->ToString() ; } Compile error
  • 33. Peak on Collections – ArrayList private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1 = gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; } private: System::Void button1_Click_1(System::Object^ sender, System::EventArgs^ e) { textBox1->Text =(MyArrayList[0]->Height).ToString() ; } Compile error
  • 34. ArrayList - dynamic_cast private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1 = gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; } private: System::Void button1_Click_1(System::Object^ sender, System::EventArgs^ e) { textBox1->Text =((dynamic_cast <Button^>(MyArrayList[0]))->Height).ToString(); } Everything is good. And will print 23. but why?
  • 35. ArrayList - dynamic_cast private: System::Collections::ArrayList ^MyArrayList ; private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { MyArrayList = gcnew System::Collections::ArrayList (4) ; static int Counter = 0 ; Button ^B1 = gcnew Button ; TextBox ^T1 ; String ^S = "ZGTR"; int i ; B1->Height = 30 ; MyArrayList->Add(B1) ; MyArrayList->Add(T1) ; MyArrayList->Add(S) ; MyArrayList->Add(i) ; } private: System::Void button1_Click_1(System::Object^ sender, System::EventArgs^ e) { textBox1->Text =((dynamic_cast <Button^>(MyArrayList[0]))->Height).ToString(); } Everything is good. And will print 30.
  • 36. ArrayList • It’s not a Generic* – private: System::Collections::ArrayList ^MyArrayList ; • Drop in performance! _____________________________________________________ *Generic : class Typed
  • 38. That’s it for today!