Ankit kumar has Published 21 Articles

C# Program to Append Text to an Existing File

Ankit kumar

Ankit kumar

Updated on 14-Jul-2023 17:33:51

5K+ Views

Introduction Append means adding information to the already written document. Here, we will be learning to write a C# program to append text to an existing file. As we know file handling is done in C#. In most cases, the file is used to store data. File handling or file ... Read More

C# Program to Read the Content of a File Line by Line

Ankit kumar

Ankit kumar

Updated on 21-Apr-2023 14:37:49

7K+ Views

Introduction Here, we’ll be learning to write a C# program to Read the content of a file content line by line. There are various methods to do so. We will be discussing them one by one. File handling is done in C#. In most cases, the file is used ... Read More

C# Program to Get the relative path from two absolute paths

Ankit kumar

Ankit kumar

Updated on 21-Apr-2023 14:36:44

4K+ Views

Introduction Let us try to understand the C# program to get the relative path from two absolute paths. We will understand using the URI( Uniform resource identifier) class and the MakeRelativeUri method. We will first understand the difference between absolute and relative paths. The absolute path includes all information required ... Read More

C# Program to get the name of the file from the absolute path

Ankit kumar

Ankit kumar

Updated on 21-Apr-2023 14:33:44

1K+ Views

Introduction Let us try to understand the C# program to get the name of the file from the absolute path. We will see the usage of the GetFileName method which comes under the File class to get the name of the file, and another method GetFileNameWithoutExtension which will return the ... Read More

C# Program to Get and Print the Command Line Arguments Using Environment Class

Ankit kumar

Ankit kumar

Updated on 21-Apr-2023 14:31:23

201 Views

Introduction Let us see how to use the instrumental environment class of C# to write a C# Program to Get and Print the Command Line Arguments Using Environment Class. Knowing all the things about C#, we will now understand one of the uses of the system.environment class in C# and ... Read More

C# Program to Get all Files Present in a Directory

Ankit kumar

Ankit kumar

Updated on 21-Apr-2023 14:30:04

9K+ Views

Introduction On the computer, we can store files in a directory, also known as a folder. A directory also contains shortcuts to other directories and files. If we want to know what all files have stored in a directory then C# also offers an easy way to do so. In ... Read More

C# Program to Generate Marksheet of Student

Ankit kumar

Ankit kumar

Updated on 21-Apr-2023 14:27:37

3K+ Views

Introduction There are a lot of ways to generate a mark sheet for a student. Today we will learn one of them. In this article, we will learn a C# program to generate the mark sheet of a student. Let us learn the algorithm first. Algorithm Let us discuss ... Read More

C# Program to find the greatest number in an array using the WHERE clause LINQ

Ankit kumar

Ankit kumar

Updated on 21-Apr-2023 14:25:55

190 Views

Introduction In this article, we are going to find the greatest number in an array using the WHERE clause in LINQ. LINQ (Language Integrated query) is used to generate queries in C# Language. The best part of LINQ is that it provides a unified source of the method to access ... Read More

C# Program to Find out the value of Sin(x)

Ankit kumar

Ankit kumar

Updated on 21-Apr-2023 14:19:06

228 Views

Introduction In this article, we will understand the C# program to find out the value of Sin(x). Sine is another name for Sin(x). It is a trigonometric angle formula. The sine of an angle is the proportion of the length of the hypotenuse to the length of the perpendicular in ... Read More

C# Program to Find Integer Numbers from the List of Objects and Sort them Using LINQ

Ankit kumar

Ankit kumar

Updated on 21-Apr-2023 14:16:25

155 Views

Introduction In this article, we will learn how to write a C# program to find integer numbers from the list of objects and sort them using LINQ. Let's have a small overview of the language. The C# programming language is frequently used to develop desktop, web, and mobile apps. Linguistic ... Read More

Advertisements