Treeview windows forms c

Последнее обновление: 15.01.2024

TreeView представляет визуальный элемент в виде дерева. Дерево содержит узлы, которые представляют объекты TreeNode.
Узлы могут содержать другие подузлы и могут находиться как скрытом, так и в раскрытом состоянии. Все узлы содержатся в свойстве Nodes.

Если мы нажем в панели Свойств на свойство Nodes, то нам откроется окно редактирования узлов TreeView:

TreeNode в Windows Forms

В этом окне мы можем добавить новые узлы, создать для них подузлы, удалить уже имеющиеся, настроить свойства узлов. Рассмотрим некоторые свойства, которые
мы здесь может установить:

  • BackColor: фоновый цвет узла

  • Checked: если равно true, то данный узел будет отмечен флажком

  • NodeFont: шрифт узла

  • ForeColor: цвет шрифта

  • Text: текст узла

  • ImageIndex: получает или задает индекс изображения, выводимого для данного узла

  • ImageKey: получает или задает индекс изображения для данного узла

  • SelectedImageKey: получает или задает индекс изображения для данного узла в выбранном состоянии

  • SelectedImageIndex: получает или задает индекс изображения, выводимого для данного узла в выбранном состоянии

  • StateImageIndex: получает или задает индекс изображения состояния (например установленного или снятого флажка,
    указывающего состояние элемента)

  • Tag: тег узла

И затем все добавленные узлы мы сможем увидеть в приложении на форме:

Кроме данных свойств, управляющих визуализацией, элемент TreeNode имеет еще ряд важных свойств, которые мы можем использовать к коде:

  • FirstNode: первый дочерний узел

  • LastNode: последний дочерний узел

  • NextNode: возвращает следующий сестринский узел по отношению к текущему

  • NextVisibleNode: возвращает следующий видимый узел по отношению к текущему

  • PrevNode: возвращает предыдущий сестринский узел по отношению к текущему

  • PrevVisibleNode: возвращает предыдущий видимый узел по отношению к текущему

  • Nodes: возвращает коллекцию дочерних узлов

  • Parent: возвращает родительский узел для текущего узла

  • TreeView: возвращает объект TreeView, в котором определен текущий узел

Программное управление узлами

Рассмотрим программное добавление и удаление узлов:

TreeNode tovarNode = new TreeNode("Товары");
// Добавляем новый дочерний узел к tovarNode
tovarNode.Nodes.Add(new TreeNode("Смартфоны"));
// Добавляем tovarNode вместе с дочерними узлами в TreeView
treeView1.Nodes.Add(tovarNode);
// Добавляем второй очерний узел к первому узлу в TreeView
treeView1.Nodes[0].Nodes.Add(new TreeNode("Планшеты"));
// удаление у первого узла второго дочернего подузла
treeView1.Nodes[0].Nodes.RemoveAt(1);
// Удаление узла tovarNode и всех его дочерних узлов
treeView1.Nodes.Remove(tovarNode);

Скрытие и раскрытие узлов

Для раскрытия узлов к объекту TreeNode применяется метод Expand(), а для скрытия — метод Collapse():

// раскрытие узла
tovarNode.Expand();
// раскрытие не только узла, но и всех его дочерних подузлов
tovarNode.ExpandAll();
// скрытие узла
tovarNode.Collapse();

Добавление чекбоксов

Чтобы добавить чекбоксы к узлам дерева, надо у TreeView установить свойство CheckBoxes = true:

treeView1.CheckBoxes = true;
TreeNode smartNode = new TreeNode("Смартфоны");
smartNode.Checked = true;
treeView1.Nodes.Add(smartNode);

treeView1.Nodes.Add(new TreeNode("Планшеты"));
treeView1.Nodes.Add(new TreeNode("Ноутбуки"));

Добавление изображений

Для добавления изображений нам нужен компонент ImageList, в котором имеется несколько картинок. Добавим эти картинки к узлам:

// установка источника изображений
treeView1.ImageList = imageList1;

TreeNode argentinaNode = new TreeNode { Text = "Аргентина", ImageIndex=0, SelectedImageIndex=0 };
treeView1.Nodes.Add(argentinaNode);

TreeNode braziliaNode = new TreeNode { Text = "Бразилия", ImageIndex = 1, SelectedImageIndex=1 };
treeView1.Nodes.Add(braziliaNode);

TreeNode chilieNode = new TreeNode { Text = "Чили", ImageIndex = 2, SelectedImageIndex=2 };
treeView1.Nodes.Add(chilieNode);

TreeNode columbiaNode = new TreeNode { Text = "Колумбия", ImageIndex = 3, SelectedImageIndex=3 };
treeView1.Nodes.Add(columbiaNode);

При установке изображений надо учитывать, что если мы не установим свойство SelectedImageIndex для каждого узла,
то в качестве картинки для выделенного узла по умолчанию будет использоваться первое изображение из ImageList.

TreeView. Практический пример

Выполним небольшую задачу с TreeView. А именно попробуем сделать примитивный интерфейс на подобие проводника. Для этого добавим
на форму элемент TreeView. А в файле кода формы пропишим следующий код:

namespace HelloApp
{
    public partial class Form1 : Form
    {
        TreeView treeView1;
        public Form1()
        {
            InitializeComponent();
            treeView1 = new();
            treeView1.Dock = DockStyle.Fill;
            Controls.Add(treeView1);
            treeView1.BeforeSelect += treeView1_BeforeSelect;
            treeView1.BeforeExpand += treeView1_BeforeExpand;
            // заполняем дерево дисками
            FillDriveNodes();
        }
        // событие перед раскрытием узла
        void treeView1_BeforeExpand(object? sender, TreeViewCancelEventArgs e)
        {
            e.Node?.Nodes.Clear();
            try
            {
                if (Directory.Exists(e.Node?.FullPath))
                {
                    string[] dirs = Directory.GetDirectories(e.Node.FullPath);
                    foreach (string dir in dirs)
                    {
                        TreeNode dirNode = new TreeNode(new DirectoryInfo(dir).Name);
                        FillTreeNode(dirNode, dir);
                        e.Node.Nodes.Add(dirNode);
                    }
                }
            }
            catch (Exception) { }
        }
        // событие перед выделением узла
        void treeView1_BeforeSelect(object? sender, TreeViewCancelEventArgs e)
        {
            e.Node?.Nodes.Clear();
            try
            {
                if (Directory.Exists(e.Node?.FullPath))
                {
                    string[] dirs = Directory.GetDirectories(e.Node.FullPath);

                    foreach (string dir in dirs)
                    {
                        TreeNode dirNode = new TreeNode(new DirectoryInfo(dir).Name);
                        FillTreeNode(dirNode, dir);
                        e.Node.Nodes.Add(dirNode);
                    }
                }
            }
            catch (Exception) { }
        }

        // получаем все диски на компьютере
        private void FillDriveNodes()
        {
            try
            {
                foreach (DriveInfo drive in DriveInfo.GetDrives())
                {
                    TreeNode driveNode = new TreeNode { Text = drive.Name };
                    FillTreeNode(driveNode, drive.Name);
                    treeView1.Nodes.Add(driveNode);
                }
            }
            catch (Exception) { }
        }
        // получаем дочерние узлы для определенного узла
        private void FillTreeNode(TreeNode driveNode, string path)
        {
            try
            {
                string[] dirs = Directory.GetDirectories(path);
                foreach (string dir in dirs)
                {
                    TreeNode dirNode = new TreeNode();
                    dirNode.Text = dir.Remove(0, dir.LastIndexOf("\\") + 1);
                    driveNode.Nodes.Add(dirNode);
                }
            }
            catch (Exception) { }
        }
    }
}

TreeView имеет ряд событий, которые позволяют нам управлять деревом. Наиболее важные из них:

  • BeforeSelect / AfterSelect: срабатывает перед / после выбора узла дерева

  • BeforeExpand / AfterExpand: срабатывает перед / после раскрытия узла дерева

  • BeforeCollapse / AfterCollapse: срабатывает перед / после скрытия узла дерева

В вышеприведенном коде мы заблаговременно перед раскрытием или выбором наполняем выбранный узел дочерними подузлами,
благодаря чему у нас появляется видимость, что узлы заполнены.

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

TreeView. This displays text and icon data. TreeView must have nodes added to it through the Nodes collection. It represents hierarchical text and icon data in a convenient way.

Get started. We add a TreeView control to the Windows Forms Application project. To do this, open the Toolbox panel by clicking on the View and then Toolbox menu item in Visual Studio.

Add example. Double-click on the Form1 window to create the Form1_Load event. In this event handler, we will insert code to build the nodes in the TreeView control.

Info To add the Form1_Load event, double-click on the window of the program in the Visual Studio designer.

Note The Nodes.Add() call adds a node instance to the treeView1 instance of the TreeView that exists.

Detail You can call the Add instance method and pass it an argument of type TreeNode to add a node to the TreeView.

using System;
using System.Windows.Forms;

namespace WindowsFormsApplication23
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
//
// This is the first node in the view.
//
TreeNode treeNode = new TreeNode(«Windows»);
treeView1.Nodes.Add(treeNode);
//
// Another node following the first node.
//
treeNode = new TreeNode(«Linux»);
treeView1.Nodes.Add(treeNode);
//
// Create two child nodes and put them in an array.
// … Add the third node, and specify these as its children.
//
TreeNode node2 = new TreeNode(«C#»);
TreeNode node3 = new TreeNode(«VB.NET»);
TreeNode[] array = new TreeNode[] { node2, node3 };
//
// Final node.
//
treeNode = new TreeNode(«Dot Net Perls», array);
treeView1.Nodes.Add(treeNode);
}
}
}

Click. We can add a double-click event handler to your TreeView program. This means that when the user double-clicks on an item, you can execute code based on that node.

Tip To add the MouseDoubleClick event handler, right-click the TreeView in the designer and select Properties.

Then Select «MouseDoubleClick» and click twice on that entry. You can then change treeView1_MouseDoubleClick, which was generated.

using System;
using System.Windows.Forms;

namespace WindowsFormsApplication23
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
// Insert code here. [OMIT]
}

private void treeView1_MouseDoubleClick(object sender, MouseEventArgs e)
{
//
// Get the selected node.
//
TreeNode node = treeView1.SelectedNode;
//
// Render message box.
//
MessageBox.Show(string.Format(«You selected: {0}», node.Text));
}
}
}

Using SelectedNode property. In the treeView1_MouseDoubleClick method, you can see that the SelectedNode property is accessed on the treeView1 control.

And This returns the selected node if one is selected. After a double-click, a node is selected so this returns a reference to that node.

Using Text property. The treeView1_MouseDoubleClick event handler also accesses the Text instance property on the treeView1 control.

And This returns a reference to the string that represents the text in the TreeNode.

Tip If you double-click on the node «Linux», a MessageBox is shown with that text.

MessageBox.Show

Summary. We added TreeNode references and children nodes to a TreeView. Next, we added an event handler, which enables primitive interaction with the TreeView nodes by the user.

Dot Net Perls is a collection of pages with code examples, which are updated to stay current. Programming is an art, and it can be learned from examples.

Donate to this site to help offset the costs of running the server. Sites like this will cease to exist if there is no financial support for them.

Sam Allen is passionate about computer languages, and he maintains 100% of the material available on this website. He hopes it makes the world a nicer place.

This page was last updated on Sep 29, 2022 (edit).

Для начала создадим Windows Forms приложение. После чего добавим на форму элемент управления TreeView, который будет заполняться данными из XML файла.

Добавим в проект XML файл. Если вы не знаете, как это сделать, то можете прочитать об этом здесь

Структура файла:

<?xml version="1.0" encoding="utf-8" ?>
<cars>
<models name = "rusAuto">
<car id="1"> VAZ </car>
<car id="2"> UAZ </car>
</models>
</cars>

Затем добавим ссылку типа XmlDocument и путь к xml файлу.

public partial class MainForm : Form
{
XmlDocument xmlDoc;
string xmlpath = @"..\..\Example.xml";

Заполнение TreeView данными из XML файла

Изобретать чего-то нового не будем, а воспользуемся готовым решением с сайта MSDN и просто скопируем код. После чего первую часть кода поместим в обработчик события Load главной формы.

private void MainForm_Load(object sender, EventArgs e)
{
xmlDoc = new XmlDocument();
xmlDoc.Load(xmlpath);
treeView1.Nodes.Clear();
treeView1.Nodes.Add(new TreeNode(xmlDoc.DocumentElement.Name));
TreeNode rootNode = new TreeNode();
rootNode = treeView1.Nodes[0];
AddNode(xmlDoc.DocumentElement, rootNode);
treeView1.ExpandAll();
}

Затем добавим вторую часть скопированного кода

private void AddNode(XmlNode inXmlNode, TreeNode inTreeNode)
{
XmlNode xNode;
TreeNode tNode;
XmlNodeList nodeList;
int i;
if (inXmlNode.HasChildNodes)
{
nodeList = inXmlNode.ChildNodes;
for (i = 0; i  1; i++)
{
xNode = inXmlNode.ChildNodes[i];
inTreeNode.Nodes.Add(new TreeNode(xNode.Name));
tNode = inTreeNode.Nodes[i];
AddNode(xNode, tNode);
}
}
else
{
inTreeNode.Text = (inXmlNode.OuterXml).Trim();
}
}

Пробуем запустить приложение, нажимаем кнопку F5.

Древовидная структура успешно отобразилась и теперь можно переходить к решению часто встречающихся задач.

Работа с элементами

Все примеры этой главы нужно поместить в обработчик события NodeMouseClick элемента управления TreeView.

private void treeView1_NodeMouseClick(object sender,
TreeNodeMouseClickEventArgs e)
{
}

Благодаря второму параметру &#171;e&#187; мы можем получить любую информацию о выделенном элементе в TreeView.

второй параметр

1. Получить название выделенного элемента

e.Node.Text;
Например: MessageBox.Show(e.Node.Text);

2. Получить индекс выделенного элемента

int indexNode =  e.Node.Index;

3. Получить количество дочерних элементов:

int countChildNodes = e.Node.Nodes.Count;

4. Изменить название выделенного элемента

e.Node.Text = "MAZ";

5. Изменить название дочернего элемента

e.Node.Nodes[0].Text = "GAZEL";

6. Удалить выделенный элемент

e.Node.Remove();

Например, удалим VAZ.

Следующий метод не обязательно помещать в данный обработчик события, его можно вызвать в любом другом месте кода.

7. очистить TreeView

treeView1.Nodes.Clear();

Все выше описанные действия затрагивают только данные внутри элемента управления TreeView и не как не отражаются в XML файле. То есть, к примеру, удаляя выделенный элемент, вы удаляете его только из коллекции элементов TreeView, но не из файла XML.

Работа с Xml файлом

Теперь рассмотрим пару примеров, как можно взаимодействовать с XML файлом. Но перед этим дополним графический интерфейс нашего приложения, добавив на форму: 2 лейбла, 2 текстовых поля: txtboxAtrName (имя атрибута), txtboxAtrValue (значение атрибута) и кнопку с надписью &#171;изменить&#187;.

GUI

1. Выбрав элемент, мы хотим получить все его атрибуты в виде пары: название и значение.

private void treeView1_NodeMouseClick(object sender, 
TreeNodeMouseClickEventArgs e)
{
//находим узел по имени
XmlNodeList nodes = xmlDoc.GetElementsByTagName(e.Node.Text);
txtboxAtrName.Text = "";
txtboxAtrValue.Text = "";
if (nodes.Count > 0)
{
XmlAttributeCollection atrCol;
atrCol = nodes[e.Node.Index].Attributes;
if (atrCol.Count > 0)
{
//получаем все атрибуты
foreach (XmlAttribute atr in atrCol)
{
txtboxAtrName.Text = atr.Name;
txtboxAtrValue.Text = atr.Value;
}
}
}
}

Например, получим имя и значение атрибута элемента models. Результат на картинке

получение атрибутов

В данном примере для вывода данных используется control Textbox, так как у элементов всего по одному атрибуту. Если же атрибутов будет больше, то используйте другие элементы управления, чтобы получить все значения.

2. Хотим изменить значение какого-либо атрибута в xml файле

private void btnChange_Click(object sender, EventArgs e)
{
if (treeView1.SelectedNode != null)
{
XmlNodeList nodes;
nodes = xmlDoc.GetElementsByTagName(treeView1.SelectedNode.Text);
//получаем индекс
int index = treeView1.SelectedNode.Index;
if (nodes.Count > 0)
{
foreach (XmlAttribute attribute in nodes[index].Attributes)
{
attribute.InnerText = txtboxAtrValue.Text;
}
//вносим изменения в XML файл
xmlDoc.Save(xmlpath);
}
}
}

Принцип работы прост. Выделяем элемент в TreeView и получаем название и значение его атрибута, используя предыдущий пример.

1 шаг

Затем изменим, значение атрибута в textbox.Value и нажмём кнопку &#171;изменить&#187;

2 шаг

Если сейчас открыть добавленный в проект XML файл то появиться надпись, о том, что файл был изменён и будет предложено обновить информацию в нём.

сообщение

Нажимаем кнопку с надписью &#171;YES&#187;, после чего данные внутри XML файла изменяться.

результат

Update

Если загрузка элементов в TreeView происходит слишком медленно, то попробуйте воспользоваться методом BeginUpdate

treeView1.BeginUpdate(); //добавить
treeView1.Nodes.Clear();
treeView1.Nodes.Add(new TreeNode(xmlDoc.DocumentElement.Name));
TreeNode rootNode = new TreeNode();
rootNode = treeView1.Nodes[0];
AddNode(xmlDoc.DocumentElement, rootNode);
treeView1.ExpandAll();
treeView1.EndUpdate(); //добавить

Видео 1.

Видео 2.

Читайте также:

  • C# WebBrowser. Часть 1: Получение и вывод данных
  • Получение текущего времени
  • Как определить версию Windows с помощью языка C#


<< Back to C-SHARP

Use the TreeView control in Windows Forms to display nested data items and allow expanding of child nodes.

TreeView. This displays text and icon data. TreeView must have nodes added to it through the Nodes collection. It can be inserted in the Visual Studio designer. It represents hierarchical text and icon data in a convenient way.

Add nodes. We add a TreeView control to the Windows Forms Application project. To do this, open the Toolbox panel by clicking on the View and then Toolbox menu item in Visual Studio. Double-click on the TreeView item.

Now: Double-click on the Form1 window in the designer so you can create the Form1_Load event.

Load: In this event handler, we will insert code to build the nodes in the TreeView control.

Info: To add the Form1_Load event, double-click on the window of the program in the Visual Studio designer.

Note: The statement «treeView1.Nodes.Add(treeNode)» adds a node instance to the treeView1 instance of the TreeView that exists.

C# program that adds to TreeView

using System;
using System.Windows.Forms;

namespace WindowsFormsApplication23
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
//
// This is the first node in the view.
//
TreeNode treeNode = new TreeNode(«Windows»);

treeView1

.Nodes.Add(treeNode);
//
// Another node following the first node.
//
treeNode = new TreeNode(«Linux»);

treeView1

.Nodes.Add(treeNode);
//
// Create two child nodes and put them in an array.
// … Add the third node, and specify these as its children.
//
TreeNode node2 = new TreeNode(«C#»);
TreeNode node3 = new TreeNode(«VB.NET»);
TreeNode[] array = new TreeNode[] { node2, node3 };
//
// Final node.
//
treeNode = new TreeNode(«The Dev Codes», array);

treeView1

.Nodes.Add(treeNode);
}
}
}

Adding to Nodes instance property. The Nodes property on the TreeView collection is an instance property, and it returns a class reference with methods that can mutate the object model of the TreeView.

Tip: You can call the Add instance method and pass it an argument of type TreeNode to add a node to the TreeView.

Also, this program shows how to create a TreeNode and specify that it has children nodes. It uses an array creation expression to create a two-element array of TreeNode references.

Then: It creates another node and specifies that array reference as the second parameter. The nodes in the array are children nodes.

Array

Click. Next in this tutorial, we look at how you can add a double-click event handler to your TreeView program. This means that when the user double-clicks on an item, you can execute code based on that node.

Tip: To add the MouseDoubleClick event handler, right-click the TreeView in the designer and select Properties.

Then: Select «MouseDoubleClick» and click twice on that entry. You can then change treeView1_MouseDoubleClick, which was generated.

TreeView and double-clicking on nodes: C#

using System;
using System.Windows.Forms;

namespace WindowsFormsApplication23
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
// Insert code here. [OMIT]
}

private void treeView1_MouseDoubleClick(object sender, MouseEventArgs e)
{
//
// Get the selected node.
//
TreeNode node =

treeView1

.SelectedNode;
//
// Render message box.
//
MessageBox.Show(string.Format(«You selected: {0}», node.Text));
}
}
}

Using SelectedNode property. In the treeView1_MouseDoubleClick method, you can see that the SelectedNode property is accessed on the treeView1 control. This returns the selected node if a node is selected.

And: After a double-click, a node is selected so this returns a reference to that node in the object model.

Using Text property. The treeView1_MouseDoubleClick event handler also accesses the Text instance property on the treeView1 control. This returns a reference to the string that represents the text in the TreeNode.

Tip: If you double-click on the node «Linux», a MessageBox is shown with that text.

MessageBox

Summary. We used the TreeView control in Windows Forms. We added TreeNode references and children nodes. Next, we added an event handler to the TreeView control, which enables primitive interaction with the TreeView nodes by the user.

Related Links:

  • C# Array Examples, String Arrays
  • C# ArrayList Examples
  • C# ArraySegment: Get Array Range, Offset and Count
  • C# break Statement
  • C# Buffer BlockCopy Example
  • C# BufferedStream: Optimize Read and Write
  • 404 Not Found
  • C# 24 Hour Time Formats
  • C# 2D Array Examples
  • 7 Zip Command Line Examples
  • C# 7 Zip Executable (Process.Start)
  • C# All Method: All Elements Match a Condition
  • C# Alphabetize String
  • C# Alphanumeric Sorting
  • C# Arithmetic Expression Optimization
  • C# Array.AsReadOnly Method (ObjectModel)
  • C# Array.BinarySearch Method
  • C# Array.Clear Examples
  • C# Array.IndexOf, LastIndexOf: Search Arrays
  • C# async, await Examples
  • C# Attribute Examples
  • C# Average Method
  • C# BackgroundWorker
  • C# base Keyword
  • C# String Between, Before, After
  • C# Binary Representation int (Convert, toBase 2)
  • C# BinarySearch List
  • C# bool Array (Memory Usage, One Byte Per Element)
  • C# bool.Parse, TryParse: Convert String to Bool
  • C# bool Type
  • C# Array Length Property, Get Size of Array
  • C# Button Example
  • C# Byte Array: Memory Usage, Read All Bytes
  • C# Byte and sbyte Types
  • C# Capacity for List, Dictionary
  • C# Case Insensitive Dictionary
  • C# case Example (Switch Case)
  • C# Char Array
  • C# Checked and Unchecked Keywords
  • C# CheckedListBox: Windows Forms
  • C# Color Table
  • C# Color Examples: FromKnownColor, FromName
  • C# ColorDialog Example
  • C# Comment: Single Line and Multiline
  • C# Concat Extension: Combine Lists and Arrays
  • C# Conditional Attribute
  • C# Console Color, Text and BackgroundColor
  • C# String Clone() method
  • C# Constructor Examples
  • C# Contains Extension Method
  • C# String GetTypeCode() method
  • C# String ToLowerInvariant() method
  • C# Customized Dialog Box
  • C# DataColumn Example: Columns.Add
  • C# DataGridView Add Rows
  • DataGridView Columns, Edit Columns Dialog
  • C# DataGridView Row Colors (Alternating)
  • C# DataGridView Tutorial
  • C# DataGridView
  • C# DataRow Examples
  • C# DataSet Examples
  • C# DataSource Example
  • C# DataTable Compare Rows
  • C# DataTable foreach Loop
  • C# DataTable RowChanged Example: AcceptChanges
  • C# DataTable Select Example
  • C# DataTable Examples
  • C# DataView Examples
  • C# String ToString() method
  • C# String ToUpper() method
  • C# Digit Separator
  • C# DateTime.MinValue (Null DateTime)
  • C# DateTime.Month Property
  • C# DateTime.Parse: Convert String to DateTime
  • C# DateTime Subtract Method
  • C# Decompress GZIP
  • C# Remove Duplicates From List
  • C# dynamic Keyword
  • C# ElementAt, ElementAtOrDefault Use
  • C# Encapsulate Field
  • C# Enum Array Example, Use Enum as Array Index
  • C# enum Flags Attribute Examples
  • C# Enum ToString: Convert Enum to String
  • C# enum Examples
  • C# Enumerable.Range, Repeat and Empty
  • C# Environment Type
  • C# EventLog Example
  • C# Exception Handling
  • C# explicit and implicit Keywords
  • C# Factory Design Pattern
  • C# File.Copy Examples
  • C# typeof and nameof Operators
  • C# String TrimEnd() method
  • C# var Examples
  • C# virtual Keyword
  • C# void Method, Return No Value
  • C# volatile Example
  • C# WebBrowser Control (Navigate Method)
  • C# WebClient: DownloadData, Headers
  • C# Where Method and Keyword
  • C# String TrimStart() method
  • C# delegate Keyword
  • C# descending, ascending Keywords
  • C# while Loop Examples
  • C# Whitespace Methods: Convert UNIX, Windows Newlines
  • C# XmlReader, Parse XML File
  • C# XmlTextReader
  • C# XmlTextWriter
  • C# XmlWriter, Create XML File
  • C# XOR Operator (Bitwise)
  • C# yield Example
  • C# float Numbers
  • FlowLayoutPanel Control
  • C# Focused Property
  • C# FolderBrowserDialog Control
  • C# Font Type: FontFamily and FontStyle
  • C# FontDialog Example
  • C# for Loop Examples
  • C# foreach Loop Examples
  • ForeColor, BackColor: Windows Forms
  • C# Form: Event Handlers
  • C# Contains String Method
  • C# ContainsValue Method (Value Exists in Dictionary)
  • C# ContextMenuStrip Example
  • C# continue Keyword
  • C# Control: Windows Forms
  • C# Windows Forms Controls
  • C# Convert Char Array to String
  • C# Convert Char to String
  • C# Convert Days to Months
  • C# Convert String to Byte Array
  • C# String Format
  • C# Func Object (Lambda That Returns a Value)
  • C# GC.Collect Examples: CollectionCount, GetTotalMemory
  • C# Path.GetDirectoryName (Remove File From Path)
  • C# goto Examples
  • C# HttpClient Example: System.Net.Http
  • ASP.NET HttpContext Request Property
  • IL Disassembler Tutorial
  • C# Intermediate Language (IL)
  • C# IndexOf Examples
  • C# IndexOfAny Examples
  • C# Initialize Array
  • C# Initialize List
  • C# InitializeComponent Method: Windows Forms
  • C# Inline Optimization
  • C# Dictionary Equals: If Contents Are the Same
  • C# Dictionary Versus List Loop
  • C# Dictionary Order, Use Keys Added Last
  • C# Dictionary Size and Performance
  • C# Dictionary Versus List Lookup Time
  • C# Dictionary Examples
  • C# Get Directory Size (Total Bytes in All Files)
  • C# Directory Type
  • C# Distinct Method, Get Unique Elements Only
  • C# Divide by Powers of Two (Bitwise Shift)
  • C# Divide Numbers (Cast Ints)
  • C# DomainUpDown Control Example
  • C# Double Type: double.MaxValue, double.Parse
  • C# Remove Duplicate Chars
  • C# IEqualityComparer
  • C# If Preprocessing Directive: Elif and Endif
  • C# If Versus Switch Performance
  • C# if Statement
  • C# int.MaxValue, MinValue (Get Lowest Number)
  • C# Program to reverse number
  • C# Int and uint Types
  • C# Integer Append Optimization
  • C# Keywords
  • C# Label Example: Windows Forms
  • C# Lambda Expressions
  • C# LastIndexOf Examples
  • C# Last, LastOrDefault Methods
  • C# Mutex Example (OpenExisting)
  • C# Named Parameters
  • C# Let Keyword (Use Variable in Query Expression)
  • C# Levenshtein Distance
  • C# LinkLabel Example: Windows Forms
  • C# LINQ
  • C# List Add Method, Append Element to List
  • C# List AddRange, InsertRange (Append Array to List)
  • C# List Clear Example
  • C# List Contains Method
  • C# List Remove Examples
  • C# List Examples
  • C# ListBox Tutorial (DataSource, SelectedIndex)
  • C# ListView Tutorial: Windows Forms
  • C# Maze Pathfinding Algorithm
  • C# Memoization
  • C# Memory Usage for Arrays of Objects
  • C# MessageBox.Show Examples
  • C# Method Call Depth Performance
  • C# Method Parameter Performance
  • C# Method Size Optimization
  • C# Multidimensional Array
  • C# MultiMap Class (Dictionary of Lists)
  • C# Optimization
  • C# new Keyword
  • C# NotifyIcon: Windows Forms
  • C# NotImplementedException
  • C# Null Array
  • C# String GetType() method
  • C# Null Coalescing and Null Conditional Operators
  • C# Null List (NullReferenceException)
  • C# Numeric Casts
  • C# NumericUpDown Control: Windows Forms
  • C# object.ReferenceEquals Method
  • C# Object Examples
  • C# Optional Parameters
  • C# Prime Number
  • C# OrderBy, OrderByDescending Examples
  • C# Process Examples (Process.Start)
  • Panel, Windows Forms (Create Group of Controls)
  • C# Path Examples
  • C# Get Percentage From Number With Format String
  • ASP.NET PhysicalApplicationPath
  • C# PictureBox: Windows Forms
  • C# PNG Optimization
  • C# Position Windows: Use WorkingArea and Location
  • Visual Studio Post Build, Pre Build Macros
  • C# ProfileOptimization
  • C# ProgressBar Example
  • C# Property Examples
  • C# PropertyGrid: Windows Forms
  • C# Protected and internal Keywords
  • C# Public and private Methods
  • C# Remove Punctuation From String
  • C# Query Windows Forms (Controls.OfType)
  • C# Queryable: IQueryable Interface and AsQueryable
  • ASP.NET QueryString Examples
  • C# Queue Collection: Enqueue
  • C# RadioButton Use: Windows Forms
  • C# ReadOnlyCollection Use (ObjectModel)
  • C# Recursion Optimization
  • C# Recursive File List: GetFiles With AllDirectories
  • C# ref Keyword
  • C# Reflection Examples
  • C# Regex.Escape and Unescape Methods
  • C# StringBuilder Examples
  • C# StringComparison and StringComparer
  • C# StringReader Class (Get Parts of Strings)
  • C# String GetEnumerator() method
  • C# String GetHashCode() method
  • C# Regex Versus Loop: Use For Loop Instead of Regex
  • C# Regex.Match Examples: Regular Expressions
  • C# RemoveAll: Use Lambda to Delete From List
  • C# Replace String Examples
  • ASP.NET Response.BinaryWrite
  • ASP.NET Response.Write
  • C# Return Optimization: out Performance
  • C# SaveFileDialog: Use ShowDialog and FileName
  • C# Scraping HTML Links
  • C# sealed Keyword
  • C# Seek File Examples: ReadBytes
  • C# select new Example: LINQ
  • C# Select Method (Use Lambda to Modify Elements)
  • C# Serialize List (Write to File With BinaryFormatter)
  • C# Settings.settings in Visual Studio
  • C# Shuffle Array: KeyValuePair and List
  • C# Single and Double Types
  • C# Single Instance Windows Form
  • C# Snippet Examples
  • C# Sort DateTime List
  • C# Sort List With Lambda, Comparison Method
  • C# Sort Number Strings
  • C# Sort Examples: Arrays and Lists
  • C# SortedDictionary
  • C# SortedList
  • C# SortedSet Examples
  • C# Split String Examples
  • C# String Copy() method
  • C# SplitContainer: Windows Forms
  • C# SqlClient Tutorial: SqlConnection, SqlCommand
  • C# SqlCommand Example: SELECT TOP, ORDER BY
  • C# SqlCommandBuilder Example: GetInsertCommand
  • C# SqlConnection Example: Using, SqlCommand
  • C# SqlDataAdapter Example
  • C# SqlDataReader: GetInt32, GetString
  • C# SqlParameter Example: Constructor, Add
  • C# Stack Collection: Push, Pop
  • C# Static List: Global List Variable
  • C# Static Regex
  • C# Static String
  • C# static Keyword
  • C# StatusStrip Example: Windows Forms
  • C# String Chars (Get Char at Index)
  • C# string.Concat Examples
  • C# String Interpolation Examples
  • C# string.Join Examples
  • C# String Performance, Memory Usage Info
  • C# String Property
  • C# String Slice, Get Substring Between Indexes
  • C# String Switch Examples
  • C# String
  • C# StringBuilder Append Performance
  • C# StringBuilder Cache
  • C# ToBase64String (Data URI Image)
  • C# Struct Versus Class
  • C# struct Examples
  • C# Substring Examples
  • C# Numeric Suffix Examples
  • C# switch Examples
  • C# String IsNormalized() method
  • C# TabControl: Windows Forms
  • TableLayoutPanel: Windows Forms
  • C# Take and TakeWhile Examples
  • C# Task Examples (Task.Run, ContinueWith and Wait)
  • C# Ternary Operator
  • C# Text Property: Windows Forms
  • C# TextBox.AppendText Method
  • C# TextBox Example
  • C# TextChanged Event
  • C# TextFieldParser Examples: Read CSV
  • C# ThreadStart and ParameterizedThreadStart
  • C# throw Keyword Examples
  • C# Timer Examples
  • C# TimeSpan Examples
  • C# TrimEnd and TrimStart
  • C# True and False
  • C# Truncate String
  • C# String ToLower() method
  • C# String ToCharArray() method
  • C# String ToUpperInvariant() method
  • C# String Trim() method
  • C# Assign Variables Optimization
  • C# Array.Resize Examples
  • C# Array.Sort: Keys, Values and Ranges
  • C# Array.Reverse Example
  • C# Array Slice, Get Elements Between Indexes
  • C# Array.TrueForAll: Use Lambda to Test All Elements
  • C# ArrayTypeMismatchException
  • C# as: Cast Examples
  • C# ASCII Table
  • C# ASCII Transformation, Convert Char to Index
  • C# AsEnumerable Method
  • C# AsParallel Example
  • ASP.NET AspLiteral
  • C# BaseStream Property
  • C# Console.Beep Example
  • C# Benchmark
  • C# BinaryReader Example (Use ReadInt32)
  • C# BinaryWriter Type
  • C# BitArray Examples
  • C# BitConverter Examples
  • C# Bitcount Examples
  • C# Bool Methods, Return True and False
  • C# bool Sort Examples (True to False)
  • C# Caesar Cipher
  • C# Cast Extension: System.Linq
  • C# Cast to Int (Convert Double to Int)
  • C# Cast Examples
  • C# catch Examples
  • C# Change Characters in String (ToCharArray, For Loop)
  • C# Char Combine: Get String From Chars
  • C# char.IsDigit (If Char Is Between 0 and 9)
  • C# char.IsLower and IsUpper
  • C# Character Literal (const char)
  • C# Char Lowercase Optimization
  • C# Char Test (If Char in String Equals a Value)
  • C# char.ToLower and ToUpper
  • C# char Examples
  • C# abstract Keyword
  • C# Action Object (Lambda That Returns Void)
  • C# Aggregate: Use Lambda to Accumulate Value
  • C# AggressiveInlining: MethodImpl Attribute
  • C# Anagram Method
  • C# And Bitwise Operator
  • C# Anonymous Function (Delegate With No Name)
  • C# Any Method, Returns True If Match Exists
  • C# StringBuilder Append and AppendLine
  • C# StringBuilder AppendFormat
  • ASP.NET appSettings Example
  • C# ArgumentException: Invalid Arguments
  • C# Array.ConvertAll, Change Type of Elements
  • C# Array.Copy Examples
  • C# Array.CreateInstance Method
  • C# Array and Dictionary Test, Integer Lookups
  • C# Array.Exists Method, Search Arrays
  • C# Array.Find Examples, Search Array With Lambda
  • C# Array.ForEach: Use Lambda on Every Element
  • C# Array Versus List Memory Usage
  • C# Array Property, Return Empty Array
  • C# CharEnumerator
  • C# Chart, Windows Forms (Series and Points)
  • C# CheckBox: Windows Forms
  • C# class Examples
  • C# Clear Dictionary: Remove All Keys
  • C# Clone Examples: ICloneable Interface
  • C# Closest Date (Find Dates Nearest in Time)
  • C# Combine Arrays: List, Array.Copy and Buffer.BlockCopy
  • C# Combine Dictionary Keys
  • C# ComboBox: Windows Forms
  • C# CompareTo Int Method
  • C# Comparison Object, Used With Array.Sort
  • C# Compress Data: GZIP
  • C# Console.Read Method
  • C# Console.ReadKey Example
  • C# Console.ReadLine Example (While Loop)
  • C# Console.SetOut and Console.SetIn
  • C# Console.WindowHeight
  • C# Console.Write, Append With No Newline
  • C# Console.WriteLine (Print)
  • C# const Example
  • C# Constraint Puzzle Solver
  • C# Count Characters in String
  • C# Count, Dictionary (Get Number of Keys)
  • C# Count Letter Frequencies
  • C# Count Extension Method: Use Lambda to Count
  • C# CSV Methods (Parse and Segment)
  • C# DataRow Field Method: Cast DataTable Cell
  • C# Get Day Count Elapsed From DateTime
  • C# DateTime Format
  • C# DateTime.Now (Current Time)
  • C# DateTime.Today (Current Day With Zero Time)
  • C# DateTime.TryParse and TryParseExact
  • C# DateTime Examples
  • C# DateTimePicker Example
  • C# Debug.Write Examples
  • C# Visual Studio Debugging Tutorial
  • C# decimal Examples
  • C# DayOfWeek
  • C# Enum.Format Method (typeof Enum)
  • C# Enum.GetName, GetNames: Get String Array From Enum
  • C# Enum.Parse, TryParse: Convert String to Enum
  • C# Error and Warning Directives
  • C# ErrorProvider Control: Windows Forms
  • C# event Examples
  • C# Get Every Nth Element From List (Modulo)
  • C# Excel Interop Example
  • C# Except (Remove Elements From Collection)
  • C# Extension Method
  • C# extern alias Example
  • C# Convert Feet, Inches
  • C# File.Delete
  • C# File Equals: Compare Files
  • C# File.Exists Method
  • C# try Keyword
  • C# TryGetValue (Get Value From Dictionary)
  • C# Tuple Examples
  • C# Type Class: Returned by typeof, GetType
  • C# TypeInitializationException
  • C# Union: Combine and Remove Duplicate Elements
  • C# Unreachable Code Detected
  • C# Unsafe Keyword: Fixed, Pointers
  • C# Uppercase First Letter
  • C# Uri and UriBuilder Classes
  • C# Using Alias Example
  • C# using Statement: Dispose and IDisposable
  • C# value Keyword
  • C# ValueTuple Examples (System.ValueTuple, ToTuple)
  • C# ValueType Examples
  • C# Variable Initializer for Class Field
  • C# Word Count
  • C# Word Interop: Microsoft.Office.Interop.Word
  • C# XElement Example (XElement.Load, XName)
  • C# Zip Method (Use Lambda on Two Collections)
  • C# File.Move Method, Rename File
  • C# File.Open Examples
  • C# File.ReadAllBytes, Get Byte Array From File
  • C# File.ReadAllLines, Get String Array From File
  • C# File.ReadAllText, Get String From File
  • C# File.ReadLines, Use foreach Over Strings
  • C# File.Replace Method
  • C# FileInfo Length, Get File Size
  • C# FileInfo Examples
  • C# File Handling
  • C# Filename With Date Example (DateTime.Now)
  • C# FileNotFoundException (catch Example)
  • C# FileStream Length, Get Byte Count From File
  • C# FileStream Example, File.Create
  • C# FileSystemWatcher Tutorial (Changed, e.Name)
  • C# finally Keyword
  • C# First Sentence
  • C# FirstOrDefault (Get First Element If It Exists)
  • C# Fisher Yates Shuffle: Generic Method
  • C# fixed Keyword (unsafe)
  • C# Flatten Array (Convert 2D to 1D)
  • C# First Words in String
  • C# First (Get Matching Element With Lambda)
  • C# ContainsKey Method (Key Exists in Dictionary)
  • C# Convert ArrayList to Array (Use ToArray)
  • C# Convert ArrayList to List
  • C# Convert Bool to Int
  • C# Convert Bytes to Megabytes
  • C# Convert Degrees Celsius to Fahrenheit
  • C# Convert Dictionary to List
  • C# Convert Dictionary to String (Write to File)
  • C# Convert List to Array
  • C# Convert List to DataTable (DataGridView)
  • C# Convert List to String
  • C# Convert Miles to Kilometers
  • C# Convert Milliseconds, Seconds, Minutes
  • C# Convert Nanoseconds, Microseconds, Milliseconds
  • C# Convert String Array to String
  • C# Convert TimeSpan to Long
  • C# Convert Types
  • C# Copy Dictionary
  • C# Count Elements in Array and List
  • C# FromOADate and Excel Dates
  • C# Generic Class, Generic Method Examples
  • C# GetEnumerator: While MoveNext, Get Current
  • C# GetHashCode (String Method)
  • C# Thumbnail Image With GetThumbnailImage
  • C# GetType Method
  • C# Global Variable Examples (Public Static Property)
  • ASP.NET Global Variables Example
  • C# Group By Operator: LINQ
  • GroupBox: Windows Forms
  • C# GroupBy Method: LINQ
  • C# GroupJoin Method
  • C# GZipStream Example (DeflateStream)
  • C# HashSet Examples
  • C# Hashtable Examples
  • HelpProvider Control Use
  • C# HTML and XML Handling
  • C# HtmlEncode and HtmlDecode
  • C# HtmlTextWriter Example
  • C# HttpUtility.HtmlEncode Methods
  • C# HybridDictionary
  • C# default Operator
  • C# DefaultIfEmpty Method
  • C# Define and Undef Directives
  • C# Destructor
  • C# DialogResult: Windows Forms
  • C# Dictionary, Read and Write Binary File
  • C# Dictionary Memory
  • C# Dictionary Optimization, Increase Capacity
  • C# Dictionary Optimization, Test With ContainsKey
  • C# DictionaryEntry Example (Hashtable)
  • C# Directives
  • C# Directory.CreateDirectory, Create New Folder
  • C# Directory.GetFiles Example (Get List of Files)
  • C# DivideByZeroException
  • C# DllImport Attribute
  • C# Do While Loop Example
  • C# DriveInfo Examples
  • C# DropDownItems Control
  • C# IComparable Example, CompareTo: Sort Objects
  • C# IDictionary Generic Interface
  • C# IEnumerable Examples
  • C# IList Generic Interface: List and Array
  • C# Image Type
  • C# ImageList Use: Windows Forms
  • C# Increment String That Contains a Number
  • C# Increment, Preincrement and Decrement Ints
  • Dot Net Perls
  • C# Indexer Examples (This Keyword, get and set)
  • C# IndexOutOfRangeException
  • C# Inheritance
  • C# Insert String Examples
  • C# int Array
  • C# Interface Examples
  • C# Interlocked Examples: Add, CompareExchange
  • C# Intersect: Get Common Elements
  • C# InvalidCastException
  • C# InvalidOperationException: Collection Was Modified
  • C# IOException Type: File, Directory Not Found
  • C# IOrderedEnumerable (Query Expression With orderby)
  • C# is: Cast Examples
  • C# IsFixedSize, IsReadOnly and IsSynchronized Arrays
  • C# string.IsNullOrEmpty, IsNullOrWhiteSpace
  • C# IsSorted Method: If Array Is Already Sorted
  • C# Jagged Array Examples
  • C# join Examples (LINQ)
  • C# KeyCode Property and KeyDown
  • C# KeyNotFoundException: Key Not Present in Dictionary
  • C# KeyValuePair Examples
  • C# Line Count for File
  • C# Line Directive
  • C# LinkedList
  • C# List CopyTo (Copy List Elements to Array)
  • C# List Equals (If Elements Are the Same)
  • C# List Find and Exists Examples
  • C# List Insert Performance
  • ASP.NET LiteralControl Example
  • C# Locality Optimizations (Memory Hierarchy)
  • C# lock Keyword
  • C# Long and ulong Types
  • C# Loop Over String Chars: Foreach, For
  • C# Loop Over String Array
  • C# Main args Examples
  • C# Map Example
  • ASP.NET MapPath: Virtual and Physical Paths
  • C# Mask Optimization
  • C# MaskedTextBox Example
  • C# Math.Abs: Absolute Value
  • C# Math.Ceiling Usage
  • C# Math.Floor Method
  • C# Math.Max and Math.Min Examples
  • C# Math.Pow Method, Exponents
  • C# Math.Round Examples: MidpointRounding
  • C# Math Type
  • C# Max and Min: Get Highest or Lowest Element
  • C# MemoryFailPoint and InsufficientMemoryException
  • C# MemoryStream: Use Stream on Byte Array
  • C# MenuStrip: Windows Forms
  • C# Modulo Operator: Get Remainder From Division
  • C# MonthCalendar Control: Windows Forms
  • C# Multiple Return Values
  • C# Multiply Numbers
  • C# namespace Keyword
  • C# NameValueCollection Usage
  • C# Nested Lists: Create 2D List or Jagged List
  • C# Nested Switch Statement
  • C# Environment.NewLine
  • C# Normalize, IsNormalized Methods
  • C# Null String Example
  • C# null Keyword
  • C# Nullable Examples
  • C# NullReferenceException and Null Parameter
  • C# Object Array
  • C# Obsolete Attribute
  • C# OfType Examples
  • C# OpenFileDialog Example
  • C# operator Keyword
  • C# Odd and Even Numbers
  • C# Bitwise Or
  • C# orderby Query Keyword
  • C# out Parameter
  • C# OutOfMemoryException
  • C# OverflowException
  • C# Overload Method
  • C# Override Method
  • C# PadRight and PadLeft: String Columns
  • C# Get Paragraph From HTML With Regex
  • C# Parallel.For Example (Benchmark)
  • C# Parallel.Invoke: Run Methods on Separate Threads
  • C# Parameter Optimization
  • C# Parameter Passing, ref and out
  • C# params Keyword
  • C# int.Parse: Convert Strings to Integers
  • C# partial Keyword
  • C# Path.ChangeExtension
  • C# Path Exists Example
  • C# Path.GetExtension: File Extension
  • C# Path.GetRandomFileName Method
  • C# Pragma Directive
  • C# Predicate (Lambda That Returns True or False)
  • C# Pretty Date Format (Hours or Minutes Ago)
  • C# PreviewKeyDown Event
  • C# Random Lowercase Letter
  • C# Random Paragraphs and Sentences
  • C# Random String
  • C# Random Number Examples
  • C# StreamReader ReadLine, ReadLineAsync Examples
  • C# readonly Keyword
  • C# Recursion Example
  • C# Regex, Read and Match File Lines
  • C# Regex Groups, Named Group Example
  • C# Regex.Matches Quote Example
  • C# Regex.Matches Method: foreach Match, Capture
  • C# Regex.Replace, Matching End of String
  • C# Regex.Replace, Remove Numbers From String
  • C# Regex.Replace, Merge Multiple Spaces
  • C# Regex.Replace Examples: MatchEvaluator
  • C# Regex.Split, Get Numbers From String
  • C# Regex.Split Examples
  • C# Regex Trim, Remove Start and End Spaces
  • C# RegexOptions.Compiled
  • C# RegexOptions.IgnoreCase Example
  • C# RegexOptions.Multiline
  • C# Region and endregion
  • C# Remove Char From String at Index
  • C# Remove Element
  • C# Remove HTML Tags
  • C# Remove String
  • C# Reserved Filenames
  • C# return Keyword
  • C# Reverse String
  • C# Reverse Words
  • C# Reverse Extension Method
  • C# RichTextBox Example
  • C# Right String Part
  • C# RNGCryptoServiceProvider Example
  • C# ROT13 Method, Char Lookup Table
  • C# SelectMany Example: LINQ
  • C# Sentinel Optimization
  • C# SequenceEqual Method (If Two Arrays Are Equal)
  • C# Shift Operators (Bitwise)
  • C# Short and ushort Types
  • C# Single Method: Get Element If Only One Matches
  • C# SingleOrDefault
  • C# Singleton Pattern Versus Static Class
  • C# Singleton Class
  • C# sizeof Keyword
  • C# Skip and SkipWhile Examples
  • C# Sleep Method (Pause)
  • C# Sort Dictionary: Keys and Values
  • C# Sort by File Size
  • C# Sort, Ignore Leading Chars
  • C# Sort KeyValuePair List: CompareTo
  • C# Sort Strings by Length
  • C# Thread.SpinWait Example
  • C# Math.Sqrt Method
  • C# stackalloc Operator
  • C# StackOverflowException
  • C# StartsWith and EndsWith String Methods
  • C# Static Array
  • C# Static Dictionary
  • C# Stopwatch Examples
  • C# Stream
  • C# StreamReader ReadToEnd Example (Read Entire File)
  • C# StreamReader ReadToEndAsync Example (Performance)
  • C# StreamReader Examples
  • C# StreamWriter Examples
  • C# String Append (Add Strings)
  • C# String Compare and CompareTo Methods
  • C# String Constructor (new string)
  • C# string.Copy Method
  • C# CopyTo String Method: Put Chars in Array
  • C# Empty String Examples
  • C# String Equals Examples
  • C# String For Loop, Count Spaces in String
  • C# string.Intern and IsInterned
  • C# String IsUpper, IsLower
  • C# String Length Property: Get Character Count
  • C# String Literal: Newline and Quote Examples
  • C# StringBuilder Capacity
  • C# StringBuilder Clear (Set Length to Zero)
  • C# StringBuilder Data Types
  • C# StringBuilder Performance
  • C# StringBuilder Equals (If Chars Are Equal)
  • C# StringBuilder Memory
  • C# StringBuilder ToString: Get String From StringBuilder
  • C# StringWriter Class
  • C# Sum Method: Add up All Numbers
  • C# Switch Char, Test Chars With Cases
  • C# Switch Enum
  • C# System (using System namespace)
  • C# Tag Property: Windows Forms
  • C# TextInfo Examples
  • C# TextReader, Returned by File.OpenText
  • C# TextWriter, Returned by File.CreateText
  • C# this Keyword
  • C# ThreadPool
  • C# Thread Join Method (Join Array of Threads)
  • C# ThreadPool.SetMinThreads Method
  • C# TimeZone Examples
  • C# Get Title From HTML With Regex
  • C# ToArray Extension Method
  • C# ToCharArray: Convert String to Array
  • C# ToDictionary Method
  • C# Token
  • C# ToList Extension Method
  • C# ToLookup Method (Get ILookup)
  • C# ToLower and ToUpper: Uppercase and Lowercase Strings
  • ToolStripContainer Control: Dock, Properties
  • C# ToolTip: Windows Forms
  • C# ToString Integer Optimization
  • C# ToString: Get String From Object
  • C# ToTitleCase Method
  • C# TrackBar: Windows Forms
  • C# Tree and Nodes Example: Directed Acyclic Word Graph
  • C# TreeView Tutorial
  • C# Trim Strings
  • C# Thread Methods
  • C# History
  • C# Features
  • C# Variables
  • C# Data Types
  • C# Operators
  • C# Keywords
  • C# New Features | C# Version Features
  • C# Programs
  • C# Program to swap numbers without third variable
  • C# Program to convert Decimal to Binary
  • C# Program to Convert Number in Characters
  • C# Program to Print Alphabet Triangle
  • C# Program to print Number Triangle
  • C# Program to generate Fibonacci Triangle
  • C# String Compare() method
  • C# String CompareOrdinal() method
  • C# String CompareTo() method
  • C# String Concat() method
  • C# String Contains() method
  • C# String CopyTo() method
  • C# String EndsWith() method
  • C# String Equals() method
  • C# String Format() method
  • C# String IndexOf() method
  • C# String Insert() method
  • C# String Intern(String str) method
  • C# String IsInterned() method
  • C# String Normalize() method
  • C# String IsNullOrEmpty() method
  • C# String IsNullOrWhiteSpace() method
  • C# String Join() method
  • C# String LastIndexOf() method
  • C# String LastIndexOfAny() method
  • C# String PadLeft() method
  • C# String PadRight() method
  • C# Nullable
  • C# String Remove() method
  • C# String Replace() method
  • C# String Split() method
  • C# String StartsWith() method
  • C# String SubString() method
  • C# Partial Types
  • C# Iterators
  • C# Delegate Covariance
  • C# Delegate Inference
  • C# Anonymous Types
  • C# Extension Methods
  • C# Query Expression
  • C# Partial Method
  • C# Implicitly Typed Local Variable
  • C# Object and Collection Initializer
  • C# Auto Implemented Properties
  • C# Dynamic Binding
  • C# Named and Optional Arguments
  • C# Asynchronous Methods
  • C# Caller Info Attributes
  • C# Using Static Directive
  • C# Exception Filters
  • C# Await in Catch Finally Blocks
  • C# Default Values for Getter Only Properties
  • C# Expression Bodied Members
  • C# Null Propagator
  • C# String Interpolation
  • C# nameof operator
  • C# Dictionary Initializer
  • C# Pattern Matching
  • C# Tuples
  • C# Deconstruction
  • C# Local Functions
  • C# Binary Literals
  • C# Ref Returns and Locals
  • C# Expression Bodied Constructors and Finalizers
  • C# Expression Bodied Getters and Setters
  • C# Async Main
  • C# Default Expression

Related Links

Adjectives
Ado
Ai
Android
Angular
Antonyms
Apache
Articles
Asp
Autocad
Automata
Aws
Azure
Basic
Binary
Bitcoin
Blockchain
C
Cassandra
Change
Coa
Computer
Control
Cpp
Create
Creating
C-Sharp
Cyber
Daa
Data
Dbms
Deletion
Devops
Difference
Discrete
Es6
Ethical
Examples
Features
Firebase
Flutter
Fs
Git
Go
Hbase
History
Hive
Hiveql
How
Html
Idioms
Insertion
Installing
Ios
Java
Joomla
Js
Kafka
Kali
Laravel
Logical
Machine
Matlab
Matrix
Mongodb
Mysql
One
Opencv
Oracle
Ordering
Os
Pandas
Php
Pig
Pl
Postgresql
Powershell
Prepositions
Program
Python
React
Ruby
Scala
Selecting
Selenium
Sentence
Seo
Sharepoint
Software
Spellings
Spotting
Spring
Sql
Sqlite
Sqoop
Svn
Swift
Synonyms
Talend
Testng
Types
Uml
Unity
Vbnet
Verbal
Webdriver
What
Wpf

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • После обновления windows 10 сам перезагружается
  • Команда для восстановления загрузчика windows 10 через командную строку
  • Аппаратное ускорение обработки графики как включить windows 10
  • Служба установки windows недоступна в безопасном режиме
  • Lenovo xclarity essentials onecli for windows