Programming Articles - Page 430 of 3366

Golang program to add two dates

Akhil Sharma
Updated on 03-Apr-2023 12:49:14

435 Views

In this Golang article, we will write programs to add two dates. The dates are added using methods like Add(), AddDate(). There are different formats to represent a date. Here, the dates after addition will be represented using YY/MM/DD format. Syntax func (t Time) Sub(u Time) Duration The sub() function in Go is used to get the difference between two dates. In this function the first two parameters i.e., t and u are date values and this function returns the difference between two values in hours, minutes and seconds. time.Parse() This function belongs to the time package. It ... Read More

C# Program to Append Text to an Existing File

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

11K+ 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

929 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

C# Program to Generate Odd Numbers in Parallel using LINQ

Ankit kumar
Updated on 31-Mar-2023 15:16:16

507 Views

Introduction This article will teach you how to create a C# program that uses LINQ to generate odd numbers in parallel. Let's take a quick look at the language. The creation of desktop, online, and mobile apps generally uses the C# programming language. One of the strengths of C# is Linguistic Integrated Query, or LINQ. Data from many sources, including arrays, collections, and databases, can be rapidly accessed by developers. It provides a common syntax for data queries, regardless of the data source. As the syntax of LINQ and SQL is similar, developers can quickly understand and use them. ... Read More

C# Program to Find the Negative Double Numbers From the List of Objects Using LINQ

Ankit kumar
Updated on 31-Mar-2023 15:09:37

519 Views

Introduction In this article, we will learn how to write a C# program to find the negative double numbers from the list of objects 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. Working with big volumes of data can be difficult in any programming language. Finding data points that satisfy a certain set of requirements or filtering out specific values is a frequent activity when working with data. The Linguistic Integrated Query (LINQ) feature of C# can be utilised to simplify and improve ... Read More

C# Program to Find the List of Students whose Name Starts with ‘S’ using where() Method of List Collection using LINQ

Ankit kumar
Updated on 31-Mar-2023 15:07:55

491 Views

Introduction The topic to learn in this article is writing a C# Program to Find the List of Students whose Name Starts with 'S' using the where() Method of List Collection using LINQ. Language Integrated Query aka LINQ is used to generate queries in C# language. Previously we had to use other relational languages like SQL and XML. It provides more power to the C# language or any other .NET language. The syntax used to query the database in LINQ is the same as that of querying for data stored in an array. Before we proceed further and ... Read More

C# Program to estimate the size of the file using LINQ

Ankit kumar
Updated on 31-Mar-2023 16:54:59

258 Views

Introduction Let us try to understand the C# program to estimate the size of the file using LINQ. We will be understanding the LINQ (Language Integrated Query) and its methods and classes and how with their help, we will get the desired output. Language Integrated Query aka LINQ is used to generate queries in C# language. Previously we had to use other relational languages like SQL and XML. It provides more power to the C# language or any other .NET language. The syntax used to query the database in LINQ is the same as that of querying for data ... Read More

C# Program to Create File and Write to the File

Ankit kumar
Updated on 31-Mar-2023 16:53:22

8K+ Views

Introduction Creating a file and writing in it is the basics of file handling. Here, we are going to discuss a way to write a C# program to create the file and write to the file. 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 of files are the two most common operations in file management. Input and output happen due to the streams which provide a generic view of a sequence of bytes. Stream is an ... Read More

Java Program to Search an Element in a Circular Linked List

Rudradev Das
Updated on 31-Mar-2023 15:01:43

397 Views

What are Liked List and Circular Linked List? Linked list is data structure in which every node contains two parts, a data and address path. These parts point to a next node, which always creates an interlinking with previous nodes. Based on this, a circular linked list is where the last node has an inter link with the first one, that is what these types of linked lists are known as circular linked lists. In the Java environment when we search for an element circular linked list, it is required to create a temporary node in the list to ... Read More

Java Program to Save a String to a File

Rudradev Das
Updated on 24-Jul-2024 21:54:31

3K+ Views

String, the series of characters, used in Java programming enable to save memory consumption and boost the performance. We can save a string to a file using Java program can be initiated in multiple ways and has been introduced in Java version 11. Four parameters can be used to save a string to a file using Java. They are the file path, character sequence, charset, and options. File path and character sequence, these two are the most important and mandatory for this approach to write into a file. This technique encodes the characters as the content, and it returns the ... Read More

Advertisements