Chandu yadav

Chandu yadav

810 Articles Published

Articles by Chandu yadav

Page 10 of 81

What is the IsReadOnly property of Hashtable class in C#?

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

The IsReadOnly property of Hashtable class is used to get a value indicating whether the Hashtable is read-only.Exampleusing System; using System.Collections; namespace Demo {    class Program {       static void Main(string[] args) {          Hashtable ht = new Hashtable();          ht.Add("One", "Amit");          ht.Add("Two", "Aman");          ht.Add("Three", "Raman");          Console.WriteLine("IsReadOnly = " + ht.IsReadOnly);          Console.ReadKey();       }    } }OutputIsReadOnly = FalseAbove we have set a Hashtable with three elements.ht.Add("One", "Amit"); ht.Add("Two", "Aman"); ht.Add("Three", "Raman");After that, we have checked using the IsReadOnly property.Console.WriteLine("IsReadOnly = " + ht.IsReadOnly);

Read More

When should you use a class vs a struct in C++?

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

Structures and classes are very similar in C++ except for some differences. So details about these differences are given below that help to decide when to use a class or structure in C++.Differences between Class and StructureAll the members of a class are private by default. This is different compared to structures as all the members of a structure are public by default.A program that demonstrates a class in C++ is given as follows −Example#include using namespace std; class Example {    int val; }; int main() {    Example obj;    obj.val = 20;    return 0; }This ...

Read More

Decimal Functions in C#

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

The following are some of the decimal functions in C#.Sr.No.Name & Description1Add (Decimal, Decimal)Adds two specified Decimal values.2Ceiling(Decimal)Returns the smallest integral value that is greater than or equal to the specified decimal number.3Compare (Decimal, Decimal)Compares two specified Decimal values.4CompareTo(Decimal)Compares this instance to a specified Decimal object and returns a comparison of their relative values.5CompareTo(Object)Compares this instance to a specified object and returns a comparison of their relative values.6Divide (Decimal, Decimal)Divides two specified Decimal values.7Equals(Decimal)Returns a value indicating whether this instance and a specified Decimal object represent the same value.Let us see an example of Decimal Ceiling() method in C# that returns the smallest integral value greater than or equal to ...

Read More

Python Text Sequence Types

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

In python the str object, handles the text or string type data. Strings are immutable. The strings are sequence of Unicode characters. We can use single quote, double quotes or triple quotes to define the string literals. ‘This is a string with single quote’ “Another Text with double quotes” ‘’’Text using three single quotes’’’ or “””Text using three double quotes””” We can use triple quotes to assign multiline strings in python. There is different string related functions. Some of the String methods are as follows − Sr.No. Operation/Functions & Description 1 s.capitalize() Convert first ...

Read More

Hide content with Bootstrap

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

To hide content with Bootstrap, use the .hidden class in Bootstrap. You can try to run the following code to hide content:Example           Bootstrap Example                                                       Content is visible.                                 Content is hidden.                    

Read More

Item text inside the list group in Bootstrap

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

To set item text inside the list group, use the .list-group-item-text class.You can try to run the following code to implement the .list-group-item-text class −Example           Bootstrap Example                                          Cars                                      Hyundai                i10                i20                                        Volkswagen                                Vento                Polo                                

Read More

What is a parameterized constructor in C# programs?

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

In a constructor you can also add parameters. Such constructors are called parameterized constructors. This technique helps you to assign initial value to an object at the time of its creation.The following is an example −// class class DemoParameterized constructor with a prarameter rank −public Demo(int rank) { Console.WriteLine("RANK = {0}", rank); }Here is the complete example displaying how to work with parameterized constructor in C# −Exampleusing System; namespace Demo {    class Line {       private double length; // Length of a line             public Line(double len) { //Parameterized constructor   ...

Read More

Time Functions in C#

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

The DateTime has methods and properties for Date and Time as well like how to get the number of hours or minutes of a day, etc.Let us only focus on the time functions −Refer MSDN (Microsoft Developer Network) for all the functions −Sr.No.Method & Properties1AddDays(Double)Returns a new DateTime that adds the specified number of days to the value of this instance.2AddHours(Double)Returns a new DateTime that adds the specified number of hours to the value of this instance.3AddMilliseconds(Double)Returns a new DateTime that adds the specified number of milliseconds to the value of this instance.4AddMinutes(Double)Returns a new DateTime that adds the specified ...

Read More

How to use Bootstrap Tab Plugins

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

By combining a few data attributes, you can easily create a tabbed interface. With this plug-in you can transition through panes of local content in tabs or pills, even via drop down menus.You can try to run the following code to implement tab plugins −Example           Bootstrap Example                                                                      Home             ...

Read More

Trigonometric Functions in C#

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

Trignometric Functions in C# include, ACos, ASin, Sin, Cos, Tan, etc. It comes under the Math type of the System namespace.The following is an example showing how to implement trigonometric functions in C# −Exampleusing System; class Program {    static void Main() {       Console.WriteLine(Math.Acos(0));       Console.WriteLine(Math.Cos(2));       Console.WriteLine(Math.Asin(0.2));       Console.WriteLine(Math.Sin(2));       Console.WriteLine(Math.Atan(-5));       Console.WriteLine(Math.Tan(1));    } }Output1.5707963267949 -0.416146836547142 0.201357920790331 0.909297426825682 -1.37340076694502 1.5574077246549Above we saw the Inverse Sine value using Asin −Math.Asin(0.2)With that, we also saw the Inverse Cosine value using Acos −Math.Acos(0)In the same ...

Read More
Showing 91–100 of 810 articles
« Prev 1 8 9 10 11 12 81 Next »
Advertisements