Nizamuddin Siddiqui has Published 2307 Articles

What are different types of parameters to a method in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 04-Aug-2020 06:47:17

2K+ Views

Methods in C# are generally the block of codes or statements in a program which gives the user the ability to reuse the same code which ultimately saves the excessive use of memory, acts as a time saver and more importantly, it provides better readability of the code.There might be ... Read More

What are different types of access modifiers available in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 04-Aug-2020 06:44:13

2K+ Views

Access modifiers are used to specify the scope of accessibility of a member of a class or type of the class itself. There are six different types of access modifiers.PublicPrivateProtectedInternalProtected InternalPrivate ProtectedPublic Access ModifierObjects that implement public access modifiers are accessible from everywhere in a project without any restrictions.Exampleusing System; ... Read More

What is @ in front of a string in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 04-Aug-2020 06:39:59

12K+ Views

It marks the string as a verbatim string literal.In C#, a verbatim string is created using a special symbol @. @ is known as a verbatim identifier. If a string contains @ as a prefix followed by double quotes, then compiler identifies that string as a verbatim string and compile ... Read More

What does the two question marks together (??) mean in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 04-Aug-2020 06:37:56

2K+ Views

It is the null-coalescing operator. The null-coalescing operator ?? returns the value of its left-hand operand if it isn't null; otherwise, it evaluates the right-hand operand and returns its result. The ?? operator doesn't evaluate its right-hand operand if the lefthand operand evaluates to non-null.A nullable type can represent a value ... Read More

What is the difference between int and Int32 in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 04-Aug-2020 06:35:51

5K+ Views

Int32 is a type provided by .NET framework whereas int is an alias for Int32 in C# language.Int32 x = 5;int x = 5;So, in use both the above statements will hold a 32bit integer. They compile to the same code, so at execution time there is no difference whatsoever.The ... Read More

How to store n number of lists of different types in a single generic list in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 04-Aug-2020 06:30:13

623 Views

We can store n number of lists of different types in a single generic list by creating a list of list of objects as shown below.List list = new List();Example Live Demousing System; using System.Collections.Generic; namespace MyApplication{    public class Program{       public static void Main(){       ... Read More

What is the use of "is" keyword in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 04-Aug-2020 06:28:19

263 Views

The "is" keyword is used to check if an object can be casted to a specific type. The return type of the operation is Boolean.Exampleusing System; namespace DemoApplication{    class Program{       static void Main(){          Employee emp = new PermanentEmployee{         ... Read More

What if we are not sure of the type of value that we want to store in a variable. How to handle this in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 04-Aug-2020 06:25:55

54 Views

As C# is a strongly-typed language, every variable and constant has a pre-defined type. Before using any variable, we must tell the compiler what type of value a variable will store.If we are not sure about the type, then it is handled using dynamic programming. Dynamic programming is supported by ... Read More

How to write text and output it as a text file using R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 11-Jul-2020 12:56:06

605 Views

The easiest way to write text and obtain it as an output is done by using writeLines function and cat function, and the output of these functions are connected with the help fileConn and sink.Example> fileConn writeLines(c("TutorialsPoint", "SIMPLY EASY LEARNING"), fileConn) > close(fileConn)We can do the same and view these ... Read More

What is the use of tilde operator (~) in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 11-Jul-2020 12:55:17

3K+ Views

Tilde operator is used to define the relationship between dependent variable and independent variables in a statistical model formula. The variable on the left-hand side of tilde operator is the dependent variable and the variable(s) on the right-hand side of tilde operator is/are called the independent variable(s). So, tilde operator ... Read More

Advertisements