Ankith Reddy has Published 995 Articles

What are the differences between constructors and destructors in C#?

Ankith Reddy

Ankith Reddy

Updated on 20-Jun-2020 12:57:24

558 Views

ConstructorsA class constructor is a special member function of a class that is executed whenever we create new objects of that class.A constructor has exactly the same name as that of class and it does not have any return type.Constructor has the same name as the class name −class Demo ... Read More

How to calculate the length of the string using C#?

Ankith Reddy

Ankith Reddy

Updated on 20-Jun-2020 11:42:42

12K+ Views

Use the String.Length property in C# to get the length of the string.str.LengthThe property calculates the words in the string and displays the length of the specified string, for example, the string Amit has 4 characters −string str = "Amit";ExampleThe following is the C# program to calculate the string length ... Read More

What are the different wildcard characters that can be used with MySQL RLIKE operator?

Ankith Reddy

Ankith Reddy

Updated on 20-Jun-2020 11:03:30

631 Views

The use of wildcards with RLIKE operators can save a lot of effort when we write a query that looks for some pattern (regular expression) in character string. The wildcards used with RLIKE are:^ − It signifies BEGINING of the string. In other words when we use this wildcard with ... Read More

How to assign a reference to a variable in C#

Ankith Reddy

Ankith Reddy

Updated on 20-Jun-2020 10:57:25

6K+ Views

To assign reference to a variable, use the ref keyword. A reference parameter is a reference to a memory location of a variable. When you pass parameters by reference, unlike value parameters, a new storage location is not created for these parameters. Declare the reference parameters using the ref keyword.Let ... Read More

What is the Capacity property of SortedList class in C#?

Ankith Reddy

Ankith Reddy

Updated on 20-Jun-2020 10:45:43

358 Views

The capacity property in SortedList class has the maximum size of the SortedList.The default capacity of a SortedList is 16.You can try to run the following the code to implement Capacity property of SortedList class in C# −Example Live Demousing System; using System.Collections; namespace Demo {    class Program { ... Read More

What MySQL returns if the list of strings, provided as argument in FIELD() function, are NULL?

Ankith Reddy

Ankith Reddy

Updated on 20-Jun-2020 08:43:16

125 Views

In case if all the arguments (list of strings) of FIELD() function are NULL then MySQL will return 0 as output.Examplemysql> Select FIELD('Ram',NULL,NULL,NULL,NULL); +----------------------------------+ | FIELD('Ram',NULL,NULL,NULL,NULL) | +----------------------------------+ |                               0  | +----------------------------------+ 1 row in set (0.00 sec)

What is the difference between CONCAT() and CONCAT_WS() functions?

Ankith Reddy

Ankith Reddy

Updated on 20-Jun-2020 08:31:58

10K+ Views

Both CONCAT() and CONCAT_WS() functions are used to concatenate two or more strings but the basic difference between them is that CONCAT_WS() function can do the concatenation along with a separator between strings, whereas in CONCAT() function there is no concept of the separator. Other significance difference between them is ... Read More

What is the importance of the order of Columns in the SET clause of UPDATE statement? Will it make big difference in result set returned by MySQL?

Ankith Reddy

Ankith Reddy

Updated on 20-Jun-2020 07:08:26

335 Views

The order of columns in the SET clause of UPDATE statement is important because MySQL provides us the updated value on columns names used in an expression. Yes, it will make big difference in the result set returned by MySQL. Following is an example to make it clear −ExampleIn this ... Read More

How is it possible to filter out the duplications in the rows of result set return by MySQL?

Ankith Reddy

Ankith Reddy

Updated on 20-Jun-2020 06:30:30

129 Views

It can be possible by using the DISTINCT keyword in SELECT clause. The DISTINCT applies to the combination of all data fields specified in SELECT clause.ExampleWe have the table ‘Student’ on which we have applied DISTINCT keyword as follows −mysql> Select * from student; +------+---------+---------+-----------+ | Id   | ... Read More

How can we get sorted output based on multiple columns?

Ankith Reddy

Ankith Reddy

Updated on 20-Jun-2020 06:25:11

235 Views

We can specify multiple columns in ORDER BY clause to get the sorted output based on those multiple columns. Following as an example to make this concept clearer −mysql> Select * from Student ORDER BY Name, Address; +------+---------+---------+-----------+ | Id   | Name    | Address | Subject   ... Read More

Advertisements