C# Programs



Basic

Fundamental Mathematical Operations

C# Program to Check whether the Entered Number is Even or Odd
C# Program to Swap 2 Numbers
C# Program to Get a Number and Display the Sum of the Digits
C# Program to Get a Number and Display the Number with its Reverse
C# Program to Print a BinaryTriangle
C# Program to Count the Number of 1’s in the Entered Number


Date Formats and Years

C# Program to Check Whether the Entered Year is a Leap Year or Not
C# Program to Display the Date in Various Formats
C# Program to Compare Two Dates
C# Program to Display the ATM Transaction
C# Program to Generate Random Numbers


Bitwise and Swapping Operations

C# Program to Accept the Height of a Person & Categorize as Tall, Dwarf or Average
C# Program to Find the Frequency of the Word ʺtheʺ in a given Sentence
C# Program to Swap the Contents of two Numbers using Bitwise XOR Operation


Access Specifiers

C# Program to Illustrate the Use of Access Specifiers
C# Program to Print a Diamond Using Nested Loop
C# Program to Illustrate LeftShift Operations
C# Program to Check whether the given Integer has an Alternate Pattern
C# Program to Read a Grade & Display the Equivalent Description
C# Program to Find Greatest among 2 numbers


Unboxing Operation and Sealed classes

C# Program to Display Squarefeet of a House
C# Program to Create Sealed Class
C# Program to Perform Unboxing Operation
C# Program to Display All the Prime Numbers Between 1 to 100
C# Program to Accept a Number from the user and Display it if it is Positive


Numerical Operations

C# Program to Find Magnitude of Integer
C# Program to Compute Average for the Set of Values
C# Program to Display Numbers in the form of Triangle



Interface and Looping Operations

C# Program to Implement PhoneBook
C# Program to Implement for-each in Inteface
C# Program to Calculate Acceleration
C# Program to Find a Number using Pythagoras Theorem
C# Program to Perform Division of Exponents of Same Base


Arrays

Different types of Arrays

C# Program to Convert a 2D Array into 1D Array
C# Program to get the Length of the Array
C# Program to Get Lower Bound and Upper Bound of an Array
C# Program to Find the Rank of a given Array
C# Program to Demonstrate Jagged Arrays


Indexing

C# Program to Get 2 Arrays as Input and Produce a 3rd Array by Appending one to other
C# Program to Search an element with Array Indices
C# Program to Implement Use of Indexers
C# Program to Find Minimum and Maximum of Numbers


Sorting, Searching, Copy and Reverse Operations

C# Program to Copy a Section of One Array to Another
C# Program to Sort a List of Names in Alphabetical Order
C# Program to Search an Element in an Array
C# Program to Reverse an Array


Negation and Average Operations

C# Program to Negate the Positive Elements of Array
C# Program to Find the Average Values of all the Array Elements
C# Program to Find the Length of the Jagged Array using Predefined Functions


Matrix Operations

C# Program to Perform Matrix Addition
C# Program to Perform Matrix Subtraction
C# Program to Generate the Transpose of a Given Matrix
C# Program to Interchange any 2 Rows of a Matrix
C# Program to Display Upper Triangular Matrix
C# Program to Check If a Given Matrix is an Identity Matrix
C# Program to Find Largest Element in a Matrix

C# Program to Perform Matrix Multiplication
C# Program to Find Sum of the Elements of each Row of the Given Matrix
C# Program to Find Sum of the Elements of each Column of the Given Matrix
C# Program to Find Smallest Element in a Matrix
C# Program to Find the Sum of the Values on Diagonal of the Matrix
C# Program to Interchange any 2 Columns of Matrix
C# Program to Find the Sum of the Values on Diagonal of the Matrix
C# Program to Display Lower Triangular Matrix\



Strings

Simple Operations on Strings

C# Program to Generate the Marksheet of the Student
C# Program to Display the Abbreviation of a Text
C# Program to Display Date in String
C# Program to List all Substrings in a given String
C# Program to Read a String and find the Sum of all Digits in the String
C# Program to Concatenate Two Strings


Reversal, Padding and Trimming Operations

C# Program to Reverse a String without using Reverse function
C# Program to Perform Padding in the String
C# Program to Trim the Given String
C# Program to Implement String Splitter
C# Program to Split a String Collections into Groups
C# Program to Perform Searching using Predefined Functions
C# Program to calculate the length of the string


Replacement and Conversion Operations

C# Program to Replace String in String
C# Program to Find the Frequency of the Word ʺisʺ in a given Sentence
C# Program to Convert Upper case to Lower Case
C# Program to Replace a Character with the String


Advanced Operations on Strings

C# Program to Count number of Vowels and consonants from a given String
C# Program to Illustrate Binary Writer
C# Program to Randomly Generate Strings
C# Program to Encrypt/Decrypt using Rijndael Key
C# Program to Count Lines in a String


Sorting

C# Program to Perform Radix Sort
C# Program to Perform a Selection Sort
C# Program to Demonstrate Heap Sort
C# Program to Perform Bubble Sort
C# Program to Perform Insertion Sort
C# Program to Perform Merge Sort
C# Program to Implement Quick Sort


Data Structures

C# Program to Implement Binary Search Tree using Linked List
C# Program to Create an Instance of StackTrace and to Get all Frames
C# Program to Create a Singly Linked Circular List
C# Program to Implement Stack with Push and Pop operations
C# Program to Implement Traversal in Singly Linked List


Files

Files and Directories

C# Program to Create a File
C# Program to Read the Contents of the File
C# Program to Create a Directory
C# Program to View the Information of the File
C# Program to View the Date and time of Access of a File
C# Program to Check the Existence of a File


StringReader and StringBuilder

C# Program to Perform Text Operations in a File
C# Program to Search Directories and List Files
C# Program to Demonstrate StringReader
C# Program to Illustrate StringBuilder
C# Program to Copy the Contents from one File to another File
C# Program to Read Lines from a File until the End of File is Reached


StringWriter, StreamReader and Memory Stream

C# Program to List Disk Drives
C# Program to Illustrate StringWriter
C# Program to Use StreamReader to Read Entire Line
C# Program to Get File Time using File Class
C# Program to Read Data from Stream and Cast Data to Chars
C# Program to Illustrate Memory Stream Class
C# Program to Illustrate Methods of FileInfo Class


Binary Reader and other File Functions

C# Program to Get Content from a File and Read the Content 1 Byte at a Time
C# Program to List the Files in a Directory
C# Program to Trap Events from File
C# Program to Calculate the Size of Folder
C# Program to Implement BinaryReader
C# Program to Perform File Comparison


Events

Mouse Handling Events

C# Program to Perform Addition with MOUSEUP Event
C# Program to Add Two TimeSpan
C# Program to Perform Subtraction with Key Up Event


Displaying the Times

C# Program to Detect Whether ENTER key is Pressed or Not
C# Program to get the Universal Time
C# Program to get the Local Time
C# Program to Get the DayLight Saving Information


Predicates and Actions

C# Program to Illustrate Predicate
C# Program to Illustrate Actions
C# Program to Create a Progress Bar Control
C# Program to Create Input Box and Display the Text
C# Program to Create Radio Button and Demonstrate its Use


Elapsed Events and Clones

C# Program to Illustrate Elapsed Event
C# Program to Demonstrate Use of Clone
C# Program to Demonstrate Trigger Concept
C# Program to Create Stop Watch


Exceptions

C# Program to Demonstrate IndexOutOfRange Exception
C# Program to Demonstrate DivideByZero Exception
C# Program to Illustrate Exception Handling for Invalid TypeCasting in UnBoxing
C# Program to Demonstrate Multiple Exceptions
C# Program to Demonstrate Exception Handling for Stack Overflow
C# Program to Illustrate Null Refernce Exception


Mathematics




Inheritance

C# Program to Demonstrate Multilevel Inheritance
C# Program to Illustrate Single Inheritance
C# Program to Illustrate Hierarchical Inheritance
C# Program to Illustrate Multilevel Inheritance with Virtual Methods
C# Program to Display Cost of a Rectangle Plot Using Inheritance


LINQ

 Applications of LINQ

C# Program to Count File Extensions and Group it using LINQ
C# Program to Calculate Size of File using LINQ
C# Program to Generate Odd Numbers in Parallel using LINQ
C# Program to Implement IEnumerable Interface using LINQ
C# Program to Divide Sequence into Groups using LINQ


Usage of LINQ in SQL Clauses

C# Program to Display the Student Details using Select Clause LINQ
C# Program to Display the Greatest numbers in an Array using WHERE Clause LINQ
C# Program to Display the Smallest numbers in an Array using FROM Clause LINQ
C# Program to Implement Let Condition using LINQ



Conversions

Number System Conversions

C# Program to Perform Binary to Decimal Conversion
C# Program to Convert Decimal to Binary
C# Program to Convert Decimal to Octal
C# Program to Perform Celsius to Fahrenheit Conversion
C# Program to Convert Fahrenheit to Celsius
C# Program to Create a Gray Code
C# Program to Obtain the Character from the User and Convert the Case of the Character


Hexadecimal and Decimal Notations

C# Program to Convert a Given Number of Days in terms of Years, Weeks & Days
C# Program to Perfom Currency Conversions
C# Program to Covert HexaDecimal Number to Decimal
C# Program to Perform Decimal to HexaDecimal Conversion
C# Program to Perform Conversions of Meter to Kilometer and viceversa


Prefix, Postfix, Big Endian and Little Endian Notation

C# Program to Convert Digits to Words
C# Program to Convert Infix to Postfix
C# Program to Demonstrate DefaultIfEmpty case
C# Program to Convert Big Endian to Little Endian


Functions

Predefined Functions

C# Program to Reverse a String with Predefined Function
C# Program to Sort a String using Predefined Function
C# Program to Demonstrate Boxing Operations
C# Program to Find Sum of Digits of a Number using Recursion
C# Program to Demonstrate the Operations of C# Path Class
C# Program to Print Binary Equivalent of an Integer using Recursion


Classes and their Abstract Properties

C# Program to find Product of 2 Numbers using Recursion
C# Program to Produce a filtered sequence of elements that contain only one property of each Student
C# Program to Demonstrate Properties of the Class
C# Program to Demonstrate Abstract Properties
C# Program to Demonstrate Environment Type
C# Program to Demonstrate the icollection Count
C# Program to Demonstrate iscollection.synchronised


Method Types and Method Hiding

C# Program Illustrate Method Hiding
C# Program to Illustrate the Concept of Goto
C# Program to Create Anonymous Method
C# Program to Implement Static Method
C# Program to Demonstrate Culture Names
C# Program to Create Obsolete Class
C# Program to Illustrate the use of Conditional Logical Operator


Namespaces and Preprocessor Attributes

C# Program to Demonstrate Pass by Value Parameter
C# Program to Print Hello World Without using WriteLine
C# Program to Demonstrate Pass by Reference Parameter
C# Program to Implement Namespaces
C# Program to Demonstrate the Working #define Preprocessor
C# Program to Illustrate Regular Expression Pattern
C# Program to Ilustrate Nullable Data Types
C# Program to Demonstrate New Modifier


Delegates

Basic Functions of Delegates

C# Program to Combine Two Delegates
C# Program to Illustrate Array of Delegates
C# Program to Display Results using Delegates


Types of Delegates

C# Program to Create Generic Delegate
C# Program to Implement Multicast Delegates
C# Program to Implement Delegates
C# Program to Declare and Instantiate Delegates


Use of Delegates in Mathematics

C# Program to Call Math Operations using Delegates
C# Program to Convert Feet to Inches using Delegates
C# Program to Implement Principles of Delegates
C# Program to Implement Arithmetic Operations using Delegates
C# Program to Use Delegate to Call 2 Methods within which First method Prints to Console and Second Method Prints to File



Gaming

C# Program to Create a HangMan Game
C# Program to Demonstrate Tower Of Hanoi
C# Program to Perform a Number Guessing Game
C# Program to Prefix Game


Networking

C# Program to Establish Client Server Relationship
C# Program to Accept an Employee Name from Client and Sends back the Employee Job using XML
C# Program to Display the IP Address of the Machine
C# Program to Illustrate how User Authentication is Done
C# Program to Implement UDP


Interfaces

C# Program to IIlustrate Handling an Event Declared in an Interface
C# Program to Demonstrate IDumpable Interface
C# Program to Demonstrate Properties of the Interface
C# Program to Demonstrate iList Interface
C# Program to Demonstrate iDictionary Interface
C# Program to Demonstrate Transactions using Interface
C# Program to Implement IComparable Interface
C# Program to Implement IEnumerable Interface using LINQ



Threads

Basics of Thread

C# Program to Create a Simple Thread
C# Program to Create Thread Pools
C# Program to Pause a Thread
C# Program to Demonstrate Lock in Thread
C# Program to Kill a Thread


Implemented on Thread

C# Program to Display the Name of the Current Thread
C# Program to Illustrate the Concept of Passing Parameter for Thread
C# Program to Display the Priority of the Thread
C# Program to Find the Current Context id of the Thread
C# Program to Assign Name to Thread by using Name Property
C# Program to Implement Sleep method of Thread
C# Program to Obtain Status of the Current Thread



100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...