Visual C++ .NET examples (example source code) Organized by topic





GUI Form /

Button 1CheckBox 1CheckBoxListBox 1ColorDialog 1
ComboBox 1Dialog 1ErrorProvider 1Form 2
Label 1ListBox 1Menu 1MessageBox 1
MonthCalendar 1Mouse 1NotifyIcon 1Panel 1
PictureBox 1RadioButtons 2RichTextBox 1SplitContainer 1
StatusStrip 1TabControl 1TextBox 1ToolStrip 1
TreeView 1

2D /

Buffer 2Coordinates 2Draw String 2Font 1
GDI 2Image 1Line 1Region 1
Shape 5TextureBrush 1Unit 1

Database ADO.net /

Blob 1DataSet 5DataTable 5DataView 2
OleDbCommand 2OleDbCommandBuilder 1OleDbConnection 2OleDbDataReader 2
SqlCommand 4SqlConnection 2SqlDataAdapter 1SqlDataReader 2
SqlDependency 1Stored Procedure 1Transaction 2

XML /

DOM 3XmlDocument 5XmlNode 3XmlNodeType 2
XmlReader 5XmlWriter 4XPath 2XPathNavigator 1

Data Type /

boolean 5Boxing Unboxing 2Cast 2Char 7
DateTime 3Decimal 6double 1Enum 8
float 1Hex 2Integer 3Long 1
Number to String 1Octal 1Pointer 6short 1
String Format 14String to Number 3String 20

Class /

abstract class 3Access Modifier 2attribute 5Casting 3
Constructor 4Destructor 3IComparable 1IDisposable 1
Inheritance 4initonly 2interface 13interior_ptr 2
literal 2Member method 1Nested Class 2Operator Overload 2
Overload 1pin_ptr 1Property 12ref class 6
reinterpret_cast 1sealed 1static field 1static method 1
value class 4virtual method 5

Delegate /

Delegate 4Event 5

Network /

Marshal 1ServiceDescription 1SoapFormatter 1TcpClient 2
TcpServer 3Udp Client 4Udp Server 2Web Services 1

Reflection /

Assembly 2Attribute 1Method 4Reflection Util 1
Type 1

Security /

CodeAccessPermission 1FileIOPermission 1GenericPrincipal 1PermissionSet 1
SecurityManager 2WindowsPrincipal 2

Thread /

Abort 1Join 2Lock 3Monitor 1
Mutex 1Sleep 1Thread Data 1Thread Definition 1
Thread Pool 1

Collections /

Array Multi Dimension 2Array Pointer 1Array 27ArrayList 16
binary_search 1BitArray 8count_if 1deque 8
Dictionary 13greater 1Hashtable 7ICollection 4
IEnumerable 2IEnumerator 6IList 1KeyValuePair 1
LinkedList 11LinkedListNode 2list 15ListDictionary 4
make_collection 1map 10max_element 1multimap 1
multiset 5NameValueCollection 6priority_queue 3queue 8
random_shuffle 1reverse_iterator 2set 6sort 4
SortedDictionary 1SortedList 10Stack 5StringCollection 12
Vector 11

Development /

Compile 1Console 5Convert 1DllImport 3
Document 18Exception 2IAsyncResult 2main 2
Pointer 3printf_s 1Process 1ResourceManager 2
ResourceReader 1StringBuilder 7StringWriter 2Timer 1

Statement /

do while 1finally 3for each 1for 1
if 1macro 1switch 1throw 4
try catch 8using 2while 1

Structure /

Constructor 1Definition 6Structure Method 1Structure Pointer 1
value struct 1

Function /

Definition 4Function parameter 6Function Return 1template 1

Generics /

Generic Array 2Generic Class 3Generic Function 6Generic Interface 3
Generic List 6Generic Property 1

File Directory /

BinaryWriter 1DirectoryInfo 8FileInfo 7FileStream 5
MemoryStream 4Serializable 2StreamReader 4StreamWriter 5

Language Basics /

Bitwise Operator 1Comparison Operators 2Constant 1gcnew 4
gcroot 2namespace 2nullptl 1