- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2628 Articles for Csharp
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
4K+ Views
C# is a programming language and .NET is a framework. .NET has Common Language Runtime (CLR), which is a virtual component of .NET framework. .NET not only has C#, but through it, you can work with VB, F#, etc. C# is a part of .NET and has the following features − Boolean Conditions Automatic Garbage Collection Standard Library Assembly Versioning Properties and Events Delegates and Events Management Easy-to-use Generics Indexers Conditional Compilation Simple Multithreading LINQ and Lambda Expressions Integration with Windows
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
201 Views
There are various categories of characters, operators, and constructs that lets you to define regular expressions. One of them is Grouping Constructs. Grouping constructs describe sub-expressions of a regular expression and capture substrings of an input string. The following table lists the grouping constructs. Grouping construct Description Pattern Matches ( subexpression ) Captures the matched subexpression and assigns it a zero-based ordinal number. (\w)\1 "ee" in "deep" (?< name >subexpression) Captures the matched subexpression into a named group. (?< double>\w)\k< double> "ee" in "deep" (?< name1 -name2 >subexpression) Defines a balancing group ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
73 Views
Gets or sets the value associated with the specified key. You can also use the Item property to add new elements.If a key does not exist, then you can include it like −myCollection["myNonexistentKey"] = myValueThe following is the code showing how to work with Item property of Hashtable class in C#.Example Live Demousing System; using System.Collections; namespace Demo { class Program { static void Main(string[] args) { Hashtable ht = new Hashtable(); ht.Add("One", "Amit"); ht.Add("Two", "Aman"); ht.Add("Three", "Raman"); ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
278 Views
Var is strictly typed in C#, whereas dynamic is not strictly typed. Var declaration var a = 10; Dynamic declaration dynamic a = 10; A Var is an implicitly typed variable, but it will not bypass the compile time errors. Example of var in C# var a = 10; a = "Demo"; // gives compile error Example of dynamics in C# dynamic a = 10; a = "Demo"; // won’t give error
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
285 Views
Quantifiers in C# specify how many instances of the previous element (which can be a character, a group, or a character class) must be present in the input string for a match to occur. Quantifier Description Pattern Matches * Matches the previous element zero or more times. \d*\.\d ".0", "19.9", "219.9" + Matches the previous element one or more times. "be+" "bee" in "been", "be" in "bent" ? Matches the previous element zero or one time. "rai?n" "ran", "rain" { n } Matches the previous element exactly n ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
256 Views
To debug your code, you need methods or properties, which are provided by Debug Class in C#. The debugger class is used to set communication with the debugger. Debug Class The Debug class inherits from System.Diagnostics. The syntax is − public static class Debug The following are the properties of the debugger class. Sr.No Property & Description 1 AutoFlush Gets or sets a value stating whether Flush should be called on the Listeners or not. 2 IndentLevel The indent level is set 3 IndetntSize The number of spaces in the ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
110 Views
Firstly, set a link list and add some elements.Demo list = new Demo(); list.Push(50); list.Push(100); list.Push(150);Now to delete nth element from headnode, pass what you want to delete. If you will set 1, then it will delete the head node.Exampleif (val == 1) { head = head.Next; return; } // n points to the node before the node we wish to delete Node n = head; // m is the node set to be deleted Node m = head.Next; for (int i = 2; i < val; i++) { n = n.Next; m = m.Next; } ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
4K+ Views
Dictionary is a collection of keys and values in C#. Dictionary is included in the System.Collection.Generics namespace.The following are the methods −Sr.NoMethod & Description1AddAdd key-value pairs in Dictionary2Clear()Remove all keys and values3RemoveRemoves the element with the specified key.4ContainsKeyChecks whether the specified key exists in Dictionary.5ContainsValueChecks whether the specified key value exists in Dictionary.6CountCount the number of key-value pairs.7ClearRemoves all the elements from Dictionary.Let us see how to add elements into a Dictionary and display the count.Example Live Demousing System; using System.Collections.Generic; public class Demo { public static void Main() { IDictionary d = new Dictionary(); ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
700 Views
Exception Propogation can be understood by how exception handling works in C#.In try, when an exception occurs the corresponding catch blocks are checked. This is done to see if they can catch the exception. If no matching exception is found, the exception is propagated to a higher-level try block. This repeats until the exception is caught. In case, the exception isn’t caught, the execution of the program comes to an end.The above concept is explain in the below example showing nested try statements.Example Live Demousing System; using System.Text; public class Demo { public static void Main() { ... Read More