Samual Sam has Published 2310 Articles

How to set the maximum width of an element with JavaScript?

Samual Sam

Samual Sam

Updated on 23-Jun-2020 13:27:41

2K+ Views

Use the maxWidth property in JavaScript to set the maximum width.ExampleYou can try to run the following code to set the maximum width of an element with JavaScript −Live Demo           Click below to set Maximum width.       Max Width       ... Read More

How to set the space between characters in a text with JavaScript?

Samual Sam

Samual Sam

Updated on 23-Jun-2020 13:05:42

433 Views

To set the space between characters, use the JavaScript letterSpacing property.ExampleYou can try to run the following code to set the space between characters in a text with JavaScript −Live Demo           Heading 1       This is Demo Text.       Set Space between characters                function display() {             document.getElementById("myID").style.letterSpacing = "7px";          }          

How to use the GetLowerBound method of array class in C#

Samual Sam

Samual Sam

Updated on 23-Jun-2020 12:46:53

469 Views

The GetLowerBound() method of array class in C# gets the lower bound of the specified dimension in the Array.Firstly, set the array and get the lower bound as shown below −arr.GetLowerBound(0).ToString()The following is an example stating the usage of GetLowerBound() method in C#.Example Live Demousing System; using System.Collections.Generic; using System.Linq; using ... Read More

How to use the return statement in C#?

Samual Sam

Samual Sam

Updated on 23-Jun-2020 12:40:43

597 Views

The return statement is used to return value. When a program calls a function, the program control is transferred to the called function. A called function performs a defined task and when its return statement is executed or when its function-ending closing brace is reached, it returns the program control ... Read More

How to use the ?: conditional operator in C#?

Samual Sam

Samual Sam

Updated on 23-Jun-2020 12:37:42

335 Views

A conditional operator is represented by the symbol '?:' The first operand is the evaluating expression. It has right to left associativity.The syntax for conditional operator.expression ? expression : expressionThe conditional operator works as follows −The first operand is implicitly converted to bool.If the first operand evaluates to true, the ... Read More

How to sort an ArrayList in C#?

Samual Sam

Samual Sam

Updated on 23-Jun-2020 12:32:40

2K+ Views

To sort an ArrayList in C#, use the Sort() method.The following is the ArrayList.ArrayList arr = new ArrayList(); arr.Add(32); arr.Add(12); arr.Add(55); arr.Add(8); arr.Add(13);Now the Sort() method is used to sort the ArrayList.arr.Sort();You can try to run the following code to sort an ArrayList in C#.Example Live Demousing System; using System.Collections; namespace ... Read More

What are the differences between public, protected and private access specifiers in C#?

Samual Sam

Samual Sam

Updated on 23-Jun-2020 12:20:52

3K+ Views

Public Access SpecifierPublic access specifier allows a class to expose its member variables and member functions to other functions and objects. Any public member can be accessed from outside the class.Example Live Demousing System; namespace Demo {    class Rectangle {       public double length;       public ... Read More

How to set an element's display type with JavaScript?

Samual Sam

Samual Sam

Updated on 23-Jun-2020 12:20:01

2K+ Views

To set an element’s display type, use the display property. If you want to hide the element, then use none.ExampleYou can try to run the following code to set an element's display type with JavaScript −Live Demo                    #myID { ... Read More

How to create arrays dynamically in C#?

Samual Sam

Samual Sam

Updated on 23-Jun-2020 12:10:04

5K+ Views

Dynamic arrays are growable arrays and have an advantage over static arrays. This is because the size of an array is fixed.To create arrays dynamically in C#, use the ArrayList collection. It represents ordered collection of an object that can be indexed individually. It also allows dynamic memory allocation, adding, ... Read More

How to set the column rule properties with JavaScript?

Samual Sam

Samual Sam

Updated on 23-Jun-2020 12:10:04

202 Views

The columnRule property is used in JavaScript to set the column rule. It allows you to set the style, color, and width between column rule.ExampleYou can try to run the following code to set the column rule properties with JavaScript −Live Demo           Click below ... Read More

Advertisements