You are on page 1of 12

C# Basic Programs

● C# Program to Check Whether a Given Number is Even or Odd


● C# Program to Print Odd Numbers in a Given Range
● C# Program to Check Whether a Number is Positive or Not
● C# Program to Find the Largest of Two Numbers
● C# Program to Swap Two Numbers
● C# Program to Check if a Number is Divisible by 2
● C# Program to Find the Sum of All the Multiples of 3 and 5
● C# Program to Print All the Multiples of 17 which are Less than 100
● C# Program to Find Sum of Digits of a Number
● C# Program to Find Sum of Digits of a Number using Recursion
● C# Program to Reverse a Number
● C# Program to Reverse a Number and Check if it is a Palindrome
● C# Program to Find the Sum of Two Binary Numbers
● C# Program to Multiply Two Binary Numbers
● C# Program to Calculate the Sum, Multiplication, Division and Subtraction
of Two Numbers
● C# Program to Perform Multiplication of Exponents of Same Base
● C# Program to Find the Division of Exponents of Same Base
● C# Program to Print Binary Equivalent of an Integer using Recursion
● C# Program to Print Multiplication Table
● C# Program to Read a Grade and Display the Equivalent Description
● C# Program to Convert Lowercase Characters by Uppercase and
Vice-Versa
● C# Program to Accept the Height of a Person and Categorize as Taller,
Dwarf & Average

C# Programs on Data Types & Operators

● C# Program to Find the Minimum Range of Data Types


● C# Program to Find the Maximum Range of Data Types
● C# Program to Perform All Arithmetic Operations
● C# Program to Demonstrate the use of Conditional Logical Operator
● C# Program to Demonstrate Boxing Operations
● C# Program to Perform Unboxing Operation
C# Programs on Numbers

● C# Program to Generate Fibonacci Series


● C# Program to Print the Factorial of a Given Number
● C# Program to Print All the Prime Numbers between 1 to 100
● C# Program to Find the Largest Prime Factor of a Number
● C# Program to Check Whether a Given Number is Perfect Number
● C# Program to Check Armstrong Number
● C# Program to Print Armstrong Number between 1 to 1000
● C# Program to Generate the Sum of N Numbers
● C# Program to Find the Sum of First 50 Natural Numbers using For Loop
● C# Program to Find the Factors of the Given Number
● C# Program to Print the Absolute Value of a Number
● C# Program to Generate Random Numbers
● C# Program to Check Whether the Given Number is a Amicable Number
or Not
● C# Program to Find Square Root of a Number
● C# Program to Find the Cube Root of a Number
● C# Program to Add Two Complex Numbers
● C# Program to Calculate Fractional Power
● C# Program to Calculate Power of Three
● C# Program to Print the Edge Values in Power Function
● C# Program to Find Product of Two Numbers using Recursion
● C# Program to Reverse a Number
● C# Program to Generate Register Number Automatically for 100 Students
using Static Constructor
● C# Program to Generate the Marksheet of the Student

Conversion Programs in C#

● C# Program to Convert Binary to Decimal


● C# Program to Convert Decimal to Binary
● C# Program to Convert Decimal to Hexadecimal
● C# Program to Convert Decimal to Octal
● C# Program to Convert Hexadecimal to Decimal
● C# Program to Create a Gray Code
● C# Program to Convert Celsius to Fahrenheit
● C# Program to Convert Fahrenheit to Celsius
● C# Program to Perform Currency Conversions
● C# Program to Convert Digits to Words
● C# Program to Convert Meter to Kilometer and Viceversa
● C# Program to Convert Big Endian to Little Endian
C# Programs on Array

Program Description

Convert 2D Array to 1D Array in C# C# Program to Convert a 2D Array into


1D Array

Jagged Arrays in C# C# Program to Demonstrate Jagged


Arrays

Lower and Upper Bound of an Array in C# Program to Print the Lower Bound
C# and Upper Bound of an Array

Find Length of an Array in C# C# Program to Find the Length of an


Array

Rank of all Elements in an Array in C# C# Program to Find the Rank of an Array

2. C# Programs on Array Operations

Program Description

Reverse an Array in C# C# Program to Reverse an Array


Search an Element in an Array in C# C# Program to Search an Element in an
Array

Array Copy in C# C# Program to Copy a Section of One


Array to Another

Sort Names in Alphabetical Order in C# C# Program to Sort a List of Names in


Alphabetical Order

3. C# Programs on Array Indexing

Program Description

Indexers in C# C# Program to Implement use of Indexers

Search an Element with Array Indices in C# Program to Search an Element with


C# Array Indices

Merge Two Arrays into Third Array in C# C# Program to Merge Two Arrays into
Third Array

Find Min and Max in Array in C# C# Program to Find Minimum and


Maximum of Numbers in an Array

4. C# Programs on Negation and Average Operations


Program Description

Negate the Positive Elements of Array in C# Program to Convert a Positive


C# Number into Negative

Average of n Numbers using Array in C# C# Program to Find the Average of an


Array

Average of Array Elements in C# C# Program to Find the Average of All the


Array Elements

Length of Jagged Array using Predefined C# Program to Find the Length of Jagged
Functions in C# Array using Predefined Functions

C# Programs on Matrix

● C# Program to Find the Smallest Element in a Matrix


● C# Program to Find the Largest Element in a Matrix
● C# Program to Add Two Matrices
● C# Program to Subtract Two Matrices
● C# Program to Multiply Two Matrices
● C# Program to Display Lower Triangular Matrix
● C# Program to Display Upper Triangular Matrix
● C# Program to Find Transpose of a Matrix
● C# Program to Check if Two Matrices are Equal
● C# Program to Check if a Matrix is an Identity Matrix
● C# Program to Find Sum of Diagonal Elements of Matrix
● C# Program to Find the Sum of Each Row of the Matrix
● C# Program to Find the Sum of Each Column of the Matrix
● C# Program to Interchange the Rows of a Matrix
● C# Program to Interchange the Columns of a Matrix
C# Programs on Strings

1. C# Programs on Strings

Program Description

String Length Program in C# C# Program to Find the Length of a String

Count Lines in a String in C# C# Program to Count the Number of


Lines in a String

Count Vowels and Consonants from a C# Program to Count Number of Vowels


String in C# and Consonants in a String

Frequency of “is” Word in a String in C# C# Program to Find the Frequency of “is”


Word in a String

Frequency of “the” Word in a String in C# C# Program to Find the Frequency of


“the” Word in a String

2. C# Programs on Simple String Operations

Program Description

String Concatenation in C# C# Program to Concatenate Two Strings


Display Date in String in C# C# Program to Display Date in String

Display Abbreviation of a Text in C# C# Program to Print the Abbreviation of a


Text

All Substrings of a String in C# C# Program to Find All Substrings in a


String

Sum of Numbers in String in C# C# Program to Find the Sum of Numbers


in a String

3. C# Programs on Padding, Reversal, and Trimming


Operations

Program Description

Reverse a String without using Reverse C# Program to Reverse a String without


Function in C# using Reverse function

Reverse a String with Predefined C# Program to Reverse a String with


Function in C# Predefined Function

Split a String Collections into Groups in C# Program to Split a String Collections


C# into Groups
String Splitter in C# C# Program to Implement String Splitter

String Trim in C# C# Program to Trim the Given String

String Padding in C# C# Program to Perform Padding in the


String

4. C# Programs on Replacement and Conversion Operations

Program Description

Replace a Character in String in C# C# Program to Replace a Character with


the String

Replace a String in String in C# C# Program to Replace a String with


Another String

Convert Uppercase to Lowercase in C# C# Program to Convert Upper case to


Lower Case

Change Case of Character in String in C# C# Program to Convert Characters of a


String to Opposite Case

5. C# Programs on Advanced String Operations


Program Description

Searching using Predefined Functions in C# Program to Perform Searching using


C# Predefined Functions

Rijndael Algorithm in C# C# Program to Encrypt/Decrypt a String


using Rijndael Key

Random String Generator in C# C# Program to Generate Random String

Print Strings from ArrayList in C# C# Program to Print Strings from


ArrayList

Data Structures & Algorithms in C#

● C# Program to Traverse the Singly Linked List


● C# Program to Demonstrate Circular Single Linked List
● C# Program to Implement a Binary Search Tree using Linked List
● C# Program to Implement Stack with Push and Pop operations
● C# Program to Convert Infix to Postfix
● C# Program to Illustrate Dining Philosopher Problem

C# Programs on LINQ

● C# Program to Generate Odd Numbers in Parallel using LINQ


● C# Program to Calculate the Size of File using LINQ
● C# Program to Count File Extensions and Group it using LINQ
● 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
1. C# Programs on LINQ Applications

Program Description

Generate Odd Numbers in Parallel using C# Program to Generate Odd Numbers in


LINQ in C# Parallel using LINQ

Calculate File Size using LINQ in C# C# Program to Calculate the Size of File
using LINQ

Count File Extensions using LINQ in C# C# Program to Count File Extensions and
Group it using LINQ

Divide Sequence into Groups using LINQ C# Program to Divide Sequence into
in C# Groups using LINQ

IEnumerable Interface using LINQ in C# C# Program to Implement IEnumerable


Interface using LINQ

2. C# Programs on LINQ Usage in SQL Clauses

Program Description

Select Clause LINQ in C# C# Program to Display the Student


Details using Select Clause LINQ
FROM Clause LINQ in C# C# Program to Display the Smallest
Numbers in an Array using FROM Clause
LINQ

WHERE Clause LINQ in C# C# Program to Display the Greatest


Numbers in an Array using WHERE
Clause LINQ

Let Condition using LINQ in C# C# Program to Implement Let Condition


using LINQ

C# Programs on Functions

● C# Program to Ilustrate Nullable Data Types


● C# Program to Demonstrate New Modifier
● C# Program to Demonstrate Abstract Properties
● C# Program to Demonstrate Method Hiding
● C# Program to Create Obsolete Class
● C# Program to Create a Sealed Class

C# Programs on Delegates

● C# Program to Implement Delegates


● C# Program to Implement Principles of Delegates
● C# Program to Implement Multicast Delegates
● C# Program to Create Generic Delegate
● C# Program to Combine Two Delegates
C# Programs on Inheritance

● C# Program to Demonstrate Single Inheritance


● C# Program to Demonstrate Multilevel Inheritance
● C# Program to Demonstrate Hierarchical Inheritance
● C# Program to Demonstrate Multilevel Inheritance with Virtual Methods
● C# Program to Display Cost of a Rectangle Plot Using Inheritance
● C# Program to Demonstrate the Overriding

C# Programs on Operator Overloading

● C# Program to Overload Binary Plus ʺ+ʺ Operator


● C# Program to Illustrate AutoIncrement Operator using ++
● C# Program to Overload Minus Plus ʺ-ʺ Operator
● C# Program to Implement Overloaded Indexers
● C# Program to Demonstrate Prefix Operator
● C# Program to Demonstrate Postfix Operator

C# Programs on Threads

● C# Program to Create a Simple Thread


● C# Program to Pause a Thread
● C# Program to Kill a Thread
● C# Program to Implement Sleep Method of Thread
● C# Program to Create Thread Pools

You might also like