typescript

How to convert string to date in TypeScript in 3 ways

Typescript program to convert a string to date. In this example, we will learn 3 different ways to convert a string to a date object in TypeScript. It will show you different ways for a string to date conversion in TypeScript.

Read
kotlin

Different ways to write to a file in Kotlin

Kotlin program to write to a file in different ways. Kotlin standard library provides a couple of methods to write content to a file. In this post we will learn different ways to do that.

Read
c#

C# program to check if a number is prime or not

C# program to check if a user input number is a prime number or not. It will use a function to check if a given number is prime or not prime.

Read
c#

Ternary operators in C#

Ternary operator is used as a decision making operator in C#. It is similar to if-else condition. In this post, we will learn how to use ternary operator in C# with example.

Read
c#

C# program to reverse a number

C# program to reverse a number. It will take one number as input from the user, reverse it and then print out the reversed number.

Read
c#

C# program to swap two numbers using XOR

XOR can be used to swap two numbers. In this post, we will learn how to use XOR to swap two numbers in C# with an example.

Read
c#

2 ways to compare two characters in C#

Learn how we can compare two characters in C#. The program will take two characters as inputs from the user, compare them and print one message if both are equal or not.

Read
c#

3 different ways in C# to print a new line

We can print a new line in different ways in c#. This post shows three different ways to print a new line with example.

Read
c#

C# program to print the weekday using switch case

C# program to print the weekday using switch case. This program will take one number as the input from the user and it will print the day name using switch case.

Read
c#

C# program to find the largest of two numbers

C# program to find the largest of two numbers. The C# program will take two numbers as inputs from the user and print out a message.

Read