Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles on Trending Technologies
Technical articles with clear explanations and examples
What is the Mutex class in C#?
The Mutex class in C# is a synchronization primitive that can also be used for interprocess synchronization.Let us see how to create a new Mutex.private static Mutex m = new Mutex();Let us now see how to initialize a new instance of the Mutex class with a Boolean value.private static Mutex m = new Mutex(true);Now let us see how to initialize a new instance of the Mutex class with a Boolean value and the name of the Mutex.Exampleusing System; using System.Threading; public class Demo { public static void Main() { Mutex mt = new Mutex(false, "NewMutex"); ...
Read MorePair Class in C#
The Pair class is the KeyValuePair class that stores a pair of values in a single list with C#.Declare KeyValuePair −var myList = new Liststring, int>>(); Now, add some elements: myList.Add(new KeyValuePair("Laptop", 1)); myList.Add(new KeyValuePair("Desktop System", 2)); myList.Add(new KeyValuePair("Tablet", 3)); myList.Add(new KeyValuePair("Mobile", 4)); myList.Add(new KeyValuePair("E-Book Reader", 5)); myList.Add(new KeyValuePair("LED", 6));Display the KeyValuePair now as shown below −Exampleusing System; using System.Collections.Generic; class Program { static void Main() { var myList = new List(); // adding elements myList.Add(new KeyValuePair ("Laptop", 1)); myList.Add(new KeyValuePair ("Desktop System", 2)); ...
Read MoreAlign Dropdown to the right with Bootstrap
To align dropdown to the right, add the class .pull-right to .dropdown-menu. You can try to run the following code to align dropdown to the rightExample Bootstrap Example Cars BMW Audi Hyundai Mitsubishi Nissan
Read MoreBootstrap 4 .flex-wrap class
Use the flex-wrap class in Bootstrap 4 to wrap flex items. The following is the code snippet to wrap the flex items − . .
Read MoreAdd green label (stating success) with Bootstrap
Use .label-success class in Bootstrap to add green label.You can try to run the following code to implement the .label-success class −Example Bootstrap Example Success label Success
Read MoreAlign an element with the baseline of the parent in Bootstrap 4
Use the align-baseline class in Bootstrap 4 to align an element with the baseline of the parent elment.Set the align-baselinec class like the following code snippet −Now add the content inside it − Demo Baseline You can try to run the following code to align an element with the parent’s baseline −Example Bootstrap Example Example This is demo text Demo Baseline
Read MoreWhat is method overloading in C#?
Two or more than two methods having the same name but different parameters is what we call method overloading in C#.Method overloading in C# can be performed by changing the number of arguments and the data type of the arguments.Let’s say you have a function that prints multiplication of numbers, then our overloaded methods will have the same name but different number of arguments −public static int mulDisplay(int one, int two) { } public static int mulDisplay(int one, int two, int three) { } public static int mulDisplay(int one, int two, int three, int four) { }The following is an ...
Read MoreReverse a Stack using C#
Set a stack and add elements to it.Stack st = new Stack(); st.Push('P'); st.Push('Q'); st.Push('R');Now set another stack to reverse it.Stack rev = new Stack();Until the count of ths Stack is not equal to 0, use the Push and Pop method to reverse it.while (st.Count != 0) { rev.Push(st.Pop()); }The following is the complete code −Exampleusing System; using System.Collections; namespace CollectionsApplication { public class Program { public static void Main(string[] args) { Stack st = new Stack(); Stack rev = new Stack(); ...
Read MoreCaret Bootstrap class
Use carets to indicate dropdown functionality and direction. To get this functionality use the class caret with a element.You can try to run the following code to implement caret Bootstrap classExample Bootstrap Example Caret Example
Read MoreIncrease the font size of a paragraph with Bootstrap
Use the .lead class in Bootstrap to increase the font size of a paragraph.You can try to run the following code to implement lead class −Example Bootstrap Example Football FIFA The 2018 FIFA World Cup is the 21st FIFA World Cup. FIFA, 2018 is going on in Russia.
Read More