Arjun Thakur has Published 1025 Articles

How to iterate over a C# list?

Arjun Thakur

Arjun Thakur

Updated on 02-Apr-2020 11:03:52

2K+ Views

Declare a list and add elements −var products = new List < string > (); // adding elements products.Add("Belts"); products.Add("T-Shirt"); products.Add("Trousers");Use a loop to iterate −foreach(var p in products) {    Console.WriteLine(p); }ExampleLet us see the complete example −using System; using System.Collections.Generic; public class Demo {    public ... Read More

Semaphore in C#

Arjun Thakur

Arjun Thakur

Updated on 01-Apr-2020 08:47:56

4K+ Views

The semaphore class lets you set a limit on the number of threads that have access to a critical section. The class is used to control access to a pool of resources. System.Threading.Semaphore is the namespace for Semaphore because it has all the methods and properties required to implement Semaphore.For ... Read More

How to remove an item from an ArrayList in C#?

Arjun Thakur

Arjun Thakur

Updated on 27-Mar-2020 10:51:33

381 Views

Firstly, set a a new ArrayList and add elements to it.ArrayList arr = new ArrayList(); arr.Add( "Jones" ); arr.Add( "Tom" ); arr.Add( "Henry" );Now let’s remove the item “Tom”. For that, use the Remove() method.arr.Remove("Tom");The following is the complete example to remove an element from ArrayList −Example Live Demousing System; using ... Read More

Bounce Out Right Animation Effect with CSS

Arjun Thakur

Arjun Thakur

Updated on 16-Mar-2020 08:05:49

67 Views

To implement Bounce Out Right Animation Effect with CSS, you can try to run the following codeExample                    .animated {             background-image: url(/css/images/logo.png);             background-repeat: no-repeat;       ... Read More

Bounce Out Animation Effect with CSS

Arjun Thakur

Arjun Thakur

Updated on 16-Mar-2020 08:01:05

161 Views

To implement Bounce Out Animation Effect with CSS, you can try to run the following code −ExampleLive Demo                    .animated {             background-image: url(/css/images/logo.png);             background-repeat: no-repeat;       ... Read More

Specify position of the background images with CSS

Arjun Thakur

Arjun Thakur

Updated on 16-Mar-2020 07:55:22

140 Views

The CSS background-origin property is used to specify the position of the background images. You can try to run the following code to implement the background-image property −ExampleLive Demo                    #demo {             border: 5px ... Read More

Fade In Down Animation Effect with CSS

Arjun Thakur

Arjun Thakur

Updated on 16-Mar-2020 07:18:14

257 Views

To implement Fade In Down Big Animation Effect on an image with CSS, you can try to run the following code −ExampleLive Demo                    .animated {             background-image: url(/css/images/logo.png);             background-repeat: ... Read More

Fade Out Animation Effect with CSS

Arjun Thakur

Arjun Thakur

Updated on 16-Mar-2020 06:56:33

543 Views

To implement Fade Out Animation Effect on an image with CSS, you can try to run the following code −ExampleLive Demo                    .animated {             background-image: url(/css/images/logo.png);             background-repeat: no-repeat;   ... Read More

Java program to find the square root of a given number

Arjun Thakur

Arjun Thakur

Updated on 13-Mar-2020 10:49:49

1K+ Views

The process of finding the square root of a number can be divided into two steps. One step is to find integer part and the second one is for fraction part.AlgorithmDefine value n to find the square root of.Define variable i and set it to 1. (For integer part)Define variable ... Read More

Write an example to find whether a given string is palindrome using recursion

Arjun Thakur

Arjun Thakur

Updated on 13-Mar-2020 07:31:14

1K+ Views

Recursion is the process of repeating items in a self-similar way. In programming languages, if a program allows you to call a function inside the same function, then it is called a recursive call of the function.Following is an example to find palindrome of a given number using recursive function.Examplepublic ... Read More

Advertisements