Articles on Trending Technologies

Technical articles with clear explanations and examples

C# program to convert an array to an ordinary list with the same items

Samual Sam
Samual Sam
Updated on 11-Mar-2026 135 Views

Set an array −int[] arr = { 23, 66, 96, 110 };Now, create a new list −var list = new List();Use the Add method and add the array elements to the list −for (int i = 0; i < arr.Length; i++) {    list.Add(arr[i]); }The following is the complete code −Exampleusing System; using System.Collections.Generic; public class Program {    public static void Main() {       int[] arr = { 23, 66, 96, 110 };       var list = new List();       for (int i = 0; i < arr.Length; i++) {          list.Add(arr[i]);       }       foreach(int res in list) {          Console.WriteLine(res);       }    } }Output23 66 96 110

Read More

sr-only Bootstrap class

George John
George John
Updated on 11-Mar-2026 461 Views

Hide an element to all devices except screen readers with the class .sr-only.You can try to run the following code to implement the sr-only Bootstrap −Example           Bootstrap Example                                                                      Email address                                                        Password                                                

Read More

Bootstrap 4 Button .btn-outline-dark class

Ricky Barnes
Ricky Barnes
Updated on 11-Mar-2026 392 Views

Use the .btn-outline-dark class in Bootstrap to set dark outline on a button.The following is an example of a button with dark outline −Set the above outline to the button, using the btn-outline-dark class as shown below −   Submit You can try to run the following code to implement the btn-outline-dark class −Example       Bootstrap Example                               Bootstrap 4     Learning  btn-outline-dark class usage:     Submit  

Read More

How to calculate Power of a number using recursion in C#?

George John
George John
Updated on 11-Mar-2026 1K+ Views

To calculate power of a number using recursion, try the following code.Here, if the power is not equal to 0, then the function call occurs which is eventually recursion −if (p!=0) {    return (n * power(n, p - 1)); }Above, n is the number itself and the power reduces on every iteration as shown below −Exampleusing System; using System.IO; public class Demo {    public static void Main(string[] args) {       int n = 5;       int p = 2;       long res;       res = power(n, p);       Console.WriteLine(res);    }    static long power (int n, int p) {       if (p!=0) {          return (n * power(n, p - 1));       }       return 1;    } }Output25

Read More

What is abstraction in C#?

Samual Sam
Samual Sam
Updated on 11-Mar-2026 3K+ Views

Abstraction and encapsulation are related features in object-oriented programming. Abstraction allows making relevant information visible and encapsulation enables a programmer to implement the desired level of abstraction.Abstraction can be achieved using abstract classes in C#. C# allows you to create abstract classes that are used to provide a partial class implementation of an interface. Implementation is completed when a derived class inherits from it. Abstract classes contain abstract methods, which are implemented by the derived class. The derived classes have more specialized functionality.The following are some of the key points −You cannot create an instance of an abstract classYou cannot ...

Read More

Create a padded grey box with rounded corners in Bootstrap

Arjun Thakur
Arjun Thakur
Updated on 11-Mar-2026 786 Views

Use the .jumbotron class to create a padded grey box with rounded corners.You can try to run the following code to implement .jumbotron class in Bootstrap.Example           Bootstrap Example                                                       Welcome to my website.             This is demo text.                            More                                

Read More

Bootstrap .modal(&quot;toggle&quot;) method

David Meador
David Meador
Updated on 11-Mar-2026 3K+ Views

Use the .modal(“toggle”) method in Bootstrap to toggle the modal.As shown below, the modal generates on the click of a button −$(document).ready(function(){   $("#button1").click(function(){     $("#newModal").modal("toggle");   }); });Here is the button used above −   Modal One You can try to run the following code to implement the modal(“toggle”) method −Example       Bootstrap Example                             Sample     Modal One                                         ×             Sample Modal                                 Click outside to close it.                                 Close                                   $(document).ready(function(){     $("#button1").click(function(){       $("#newModal").modal("toggle");     });   });  

Read More

Bootstrap class pull-right

Samual Sam
Samual Sam
Updated on 11-Mar-2026 2K+ Views

Float an element to the right with class pull-right.You can try to run the following code to implement the pull-right classExample           Bootstrap Example                                          Float to right          

Read More

Add Red label with Bootstrap

Anvi Jain
Anvi Jain
Updated on 11-Mar-2026 615 Views

Use .label-danger class in Bootstrap to add red colored label.You can try to run the following code to implement the .label-danger class −Example           Bootstrap Example                                          If you find any issues, click below          Danger          

Read More

Container to create a grid of Bootstrap 4 cards like a group

David Meador
David Meador
Updated on 11-Mar-2026 417 Views

To set a container for Bootstrap card and set it like a group, use the card-group class.Use it and create a grid like the following with two Bootstrap cards −             Demo Text!                          Warning!           The following is an example to create a grid (group of cards) in Bootstrap −Example       Bootstrap Example                             Group of Messages                             Demo Text!                                       Warning!                                        Well done!                                       Selected!                        

Read More
Showing 9781–9790 of 61,259 articles
« Prev 1 977 978 979 980 981 6126 Next »
Advertisements