Chandu yadav

Chandu yadav

810 Articles Published

Articles by Chandu yadav

Page 26 of 81

C# Queryable LongCount Method

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 219 Views

Use the Linq LongCount method to get the count of elements.The following is our string array −string[] emp = { "Jack", "Mark"};Now, use the LongCount() method.emp.AsQueryable().LongCount();Here is the complete code.Exampleusing System; using System.Collections.Generic; using System.Linq; class Demo {    static void Main() {       string[] emp = { "Jack", "Mark"};       long res = emp.AsQueryable().LongCount();       Console.WriteLine("{0} employees in the Department", res);    } }Output2 employees in the Department

Read More

Bootstrap .btn-block class

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 482 Views

To create a button using the .btn-block class, you can try to run the following code −Example           Bootstrap Example                                       The following are block level buttons:                Block level Primary button                      Block level button          

Read More

C# Program to filter array elements based on a predicate

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 3K+ Views

Set an array.int[] arr = { 40, 42, 12, 83, 75, 40, 95 };Use the Where clause and predicate to get elements above 50.IEnumerable myQuery = arr.AsQueryable() .Where((a, index) => a >= 50);Let us see the complete code −Exampleusing System; using System.Linq; using System.Collections.Generic; public class Demo {    public static void Main() {       int[] arr = { 40, 42, 12, 83, 75, 40, 95 };       Console.WriteLine("Array:");       foreach (int a in arr) {          Console.WriteLine(a);       }       // getting elements above 70       IEnumerable myQuery = arr.AsQueryable() .Where((a, index) => a >= 50);       Console.WriteLine("Elements above 50...:");       foreach (int res in myQuery) {          Console.WriteLine(res);       }    } }OutputArray: 40 42 12 83 75 40 95 Elements above 50...: 83 75 95

Read More

Bootstrap .radio-inline class

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 1K+ Views

Use .radio-inline class to a series of radios for controls to appear on the same line. You can try to run the following code to implement the radio-inline class in Bootstrap −Example           Bootstrap Forms                                       Best Porgraming Language                             Java                                 C                                 C++                    

Read More

What does the interface ICloneable do in C#?

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 3K+ Views

The ICloneable interface creates a copy of the exisiting object i.e a clone.It only has a single method −Clone() − The clone() method creates a new object that is a copy of the current instance.The following is an example showing how to perform cloning using Icloneable interface −Exampleusing System; class Car : ICloneable {    int width;    public Car(int width) {       this.width = width;    }    public object Clone() {       return new Car(this.width);    }    public override string ToString() {       return string.Format("Width of car ...

Read More

C# Program to perform Currency Conversion

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 5K+ Views

Let’s say you need to get the value of 10 dollars in INR.Firstly, set the variables: double usd, inr, val;Now set the dollars and convert it to INR.// how many dpllars usd = 10; // current value of US$ val = 69; inr = usd * val;Let us see the complete code −Exampleusing System; namespace Demo {    public class Program {       public static void Main(string[] args) {          Double usd, inr, val;          // how many dpllars          usd = 10;          // current value of US$          val = 69;          inr = usd * val;          Console.WriteLine("{0} Dollar = {1} INR", usd, inr);       }    } }Output10 Dollar = 690 INR

Read More

Modular multiplicative inverse in java

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 1K+ Views

The java.math.BigInteger.modInverse(BigInteger m) returns a BigInteger whose value is (this-1 mod m). Using this method you can calculate Modular multiplicative inverse for a given number.Programimport java.math.*; public class BigIntegerDemo {    public static void main(String[] args) {       // create 3 BigInteger objects       BigInteger bi1, bi2, bi3;             // create a BigInteger exponent       BigInteger exponent = new BigInteger("2");       bi1 = new BigInteger("7");       bi2 = new BigInteger("20");             // perform modPow operation on bi1 using bi2 and exp       bi3 = bi1.modPow(exponent, bi2);       String str = bi1 + "^" +exponent+ " mod " + bi2 + " is " +bi3;             // print bi3 value       System.out.println( str );    } }Output7^2 mod 20 is 9

Read More

Bootstrap Grid for multiple devices

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 493 Views

The following is an example showing the usage of Grid for multiple devices −Example           Bootstrap Example                                          Hello, world!                                      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do                   eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut         ...

Read More

Bootstrap .pagination class

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 478 Views

Use the .pagination class to get the pagination on your page.You can try to run the following code to implement the .pagination class −Example           Bootstrap Example                                 Coding Examples       The following are the examples:                «          Code1          Code2          Code3          »          

Read More

Set Column Ordering in Bootstrap

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 1K+ Views

Write the columns in an order, and show them in another one. You can easily change the order of built-in grid columns with .col-md-push-* and .col-md-pull-*modifier classes where * range from 1 to 11.Example           Bootstrap Example                                          Heading                       Before Ordering                            I am on left                                        I am on right                                                       After Ordering                            I was on left                                        I was on right                                  

Read More
Showing 251–260 of 810 articles
« Prev 1 24 25 26 27 28 81 Next »
Advertisements