Found 2745 Articles for Csharp

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

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

229 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 a right-angled trapezoid. The robust computer language C# can be used to resolve challenging mathematical issues. Finding the value of sin(x), where x is any angle in radians, is one of these issues. In this article, we'll look at how to use the Math library to create a C# program ... Read More

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

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

163 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 Integrated Query, sometimes known as LINQ, is one of C#'s strong points. Developers may quickly query data from various sources, including arrays, collections, and databases. It gives developers access to a syntax that is comparable to SQL (Structured Query Language) and enables simple data manipulation and sorting. Regardless of the ... Read More

C# Program to Estimate the Size of Folder

Ankit kumar
Updated on 21-Apr-2023 14:14:28

177 Views

Introduction In this article, we will understand the C# program to estimate the size of a folder. On our PC, we store files in a directory called a folder. We will also be understanding how to estimate the size of folders that are present inside a file. Calculation of just file size is not enough to reach our goal. Instead we need to calculate the size of folders and subfolders too. The article below will explain to calculate the size of the folder in three parts. The first part we will know will be the GetFolderSize method which will ... Read More

C# Program to Delete Empty and Nonempty Directory

Ankit kumar
Updated on 21-Apr-2023 14:08:47

347 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. Here, we will discuss the C# Program to Delete Empty and Non-empty Directories. A static class called Directory offers static methods for dealing with directories. A DirectoryInfo object offers details on a particular directory. Delete Empty and Non-empty Directory Now that we have a directory (either empty or not), we must delete it. An empty directory indicates that there are no files or subdirectories present in the directory. A directory can be ... Read More

C# Program to Create String from Contents of a File

Ankit kumar
Updated on 21-Apr-2023 14:01:00

94 Views

Introduction Let us see how to create a C# program to create a string from the contents of a file. The string is an integral part of file handling. A string in C# is a series of letters. Like, "TutorialsPoint" is a string containing 't' 'u' 't' 'o' 'r' 'i' 'a' 'l' 's' 'p' 'o' 'i' 'n' 't' as characters. We use the string keyword to create a string. File handling or file management in layman's terms the various processes such as making the file, reading from it, writing to it, appending it, and so on. The viewing and writing ... Read More

C# Program to Copy a File

Ankit kumar
Updated on 21-Apr-2023 13:58:59

226 Views

Introduction C# is a high-level language that caters to the large needs of programmers. It can also help in copying a file. So, in this article, we will learn a C# Program to Copy a File. As we know file copying falls in the category of file handling. So, before we proceed further let us recap the definition of file handling. File handling or file management in layman’s terms the various processes such as making the file, reading from it, writing to it, appending it, and so on. The reading and writing of files are the two most ... Read More

C# Program to check if a path is a directory or a file

Ankit kumar
Updated on 21-Apr-2023 13:53:26

3K+ Views

Introduction Let us learn how to write C# program to check if a path is a directory or a file. A directory, also known as a folder, is a place on your computer where you can save files. A directory holds other directories or shortcuts in addition to files. A file is a collection of data on a drive that has a unique identifier and a directory path. When a file is opened for viewing or writing, it is transformed into a stream. The stream is simply a sequence of bytes traversing the communication route. Files vs Directory ... Read More

Difference between JavaScript and C#

Pradeep Kumar
Updated on 19-Apr-2023 17:31:58

378 Views

Two programming languages that have been widely used in the field of software development are JavaScript and C# (pronounce "C sharp"). Both languages are employed for various purposes and each has its own advantages and disadvantages. The main application of the programming language JavaScript is the creation of websites. It is frequently used to build dynamic and interactive web sites. Because JavaScript is a client-side language, it executes in the client's browser rather than on the server. It is a popular option for novices because it is simple to learn and has a low entry barrier. On the ... Read More

C# Program to Append Text to an Existing File

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 management in layman’s terms the various processes such as making the file, reading from it, writing to it, appending it, and so on. Only to Existing Files? Well, as we know appending generally means adding a piece of information to the already written document. But what if the file we ... Read More

C# Program to Generate Random Even Numbers Using LINQ Parallel Query

Ankit kumar
Updated on 04-Apr-2023 16:14:46

497 Views

Introduction In this article we will learn how to write a C# program that uses LINQ parallel query to generate random even numbers. Let's quickly review the language. The C# programming language is basically used to create desktop, internet, and mobile apps. Linguistic Integrated Query, also known as LINQ, is one of the advantages of C#. Developers may quickly access data from a variety of sources, including arrays, collections, and databases. Regardless of the data source, it offers a standard syntax for data queries. As LINQ and SQL share a similar syntax, developers can use and understand them both easily. ... Read More

Previous 1 ... 4 5 6 7 8 ... 275 Next
Advertisements