Chandu yadav has Published 1091 Articles

What is the System.Reflection.Module in C#?

Chandu yadav

Chandu yadav

Updated on 21-Jun-2020 14:18:33

244 Views

The System.Reflection namespace contains classes that allow you to obtain information about the application and to dynamically add types, values, and objects to the application.It has a module constructor that initializes a new instance of the Module class. A module is a portable executable file that has one or more ... Read More

How to define character constants in C#?

Chandu yadav

Chandu yadav

Updated on 21-Jun-2020 13:50:27

266 Views

Character literals are enclosed in single quotes. For example, 'x' and can be stored in a simple variable of char type. A character literal can be a plain character (such as 'x'), an escape sequence (such as '\t'), or a universal character (such as '\u02C0').Let us see an example how ... Read More

How to copy a section of an array into another array in C#?

Chandu yadav

Chandu yadav

Updated on 21-Jun-2020 13:38:56

297 Views

The Array.Copy() method in C# is used to copy section of one array to another array.The following is the syntax −Array.Copy(src, dest, length);Here, src = array to be copieddest = destination arraylength = how many elements to copyThe following is an example showing the usage of Copy(, , ) method ... Read More

How to copy a section of one Array to another in C#?

Chandu yadav

Chandu yadav

Updated on 21-Jun-2020 13:27:54

3K+ Views

The Array.Copy() method in C# is used to copy section of one array to another array.The following is the syntax −Array.Copy(src, dest, length);Here, src = array to be copieddest = destination arraylength = how many elements to copyThe following is an example showing the usage of Copy(, , ) method ... Read More

Value parameters vs Reference parameters vs Output Parameters in C#

Chandu yadav

Chandu yadav

Updated on 21-Jun-2020 13:15:38

3K+ Views

Value parametersThe value parameters copy the actual value of an argument into the formal parameter of the function. In this case, changes made to the parameter inside the function have no effect on the argument.This is the default mechanism for passing parameters to a method. In this mechanism, when a ... Read More

What is a static class in C#?

Chandu yadav

Chandu yadav

Updated on 21-Jun-2020 12:45:28

569 Views

The C# static class cannot be instantiated and can only have only static members. The static class in C# is sealed and cannot contain instance constructors.The following is an example with static class and static members −Exampleusing System; public static class Demo {    public static float PI = ... Read More

What are the hidden features of C#?

Chandu yadav

Chandu yadav

Updated on 21-Jun-2020 12:06:09

390 Views

The following are the hidden or lesser known useful features of C# −Lambda ExpressionsA lambda expression in C# describes a pattern. It has the token => in an expression context. This is called goes to operator and used when a lambda expression is declared.NullablesC# provides a special data types, the ... Read More

Set the color of the four borders using CSS

Chandu yadav

Chandu yadav

Updated on 21-Jun-2020 10:23:16

82 Views

To set the color of the four borders, use the border-color property. You can try to run the following code to set border color for all the bordersExampleLive Demo                    p {             border-style: dashed;             border-color: #808000 #800000 #FF0000 #FFFF00;          }                     This is demo text with four colored border.     Output

Style elements with a value within a specified range with CSS

Chandu yadav

Chandu yadav

Updated on 21-Jun-2020 08:40:26

155 Views

To style elements with a value within a specified range, use the CSS :in-range selector. You can try to run the following code to implement the :in-range selectorExampleLive Demo                    input:in-range {             border: 3px dashed orange;             background: yellow;          }                           The style only works for the value entered i.e. 9    

What are increment (++) and decrement (--) operators in C#?

Chandu yadav

Chandu yadav

Updated on 20-Jun-2020 17:31:20

578 Views

Increment OperatorsTo increment a value in C#, you can use the increment operators i.e. Pre-Increment and Post-Increment Operators.The following is an example −Exampleusing System; class Demo {    static void Main() {       int a = 250;       Console.WriteLine(a);       a++;   ... Read More

Advertisements