- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Ankith Reddy has Published 1070 Articles
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
162 Views
To concat lists in C#, ue the Concat method.The following is the list −var list1 = new List{12, 40}; var list2 = new List{98, 122, 199, 230};Here is the Concat method −var res = list1.Concat(list2);The following is the example to work with Concat method −Example Live Demousing System.Collections.Generic; using System.Linq; using ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
1K+ Views
As we know that views are definitions built on the top of other tables or views and stored in the database. Followings are benefits of using MySQL views as compared to selecting data directly from MySQL base tablesSimplify data accessThe use of views simplifies the data access because of the ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
1K+ Views
Let us say our JavaScript array is − var myArr = new Array(5); myArr[0] = "Welcome"; myArr[1] = "to"; myArr[2] = "the"; myArr[3] = "Web"; myArr[4] = "World"; Now, convert the array into a string using comma as a separator −document.getElementById('demo1').value = myArr.join(', ');Now, ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
151 Views
It can be done with the help of the INFORMATION_SCHEMA database. The following statement will give us the metadata of events −mysql> SELECT * from INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME LIKE '%event%' A ND EVENT_SCHEMA = 'query'\G *************************** 1. row *************************** EVENT_CATALOG: def EVENT_SCHEMA: query ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
55 Views
The ToEven property is used with the MidpointRounding Enumeration to round a number to the nearest even number.Declare and initialize a decimal number −decimal val = 70.45M;To rounde a number to the nearest even number −decimal.Round(val, 0, MidpointRounding.ToEven)Here is the complete code −Example Live Demousing System; using System.Linq; class Demo ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
944 Views
To convert an ArrayList to Array, use the ToArray() method in C#.Firstly, set an ArrayList −ArrayList arrList = new ArrayList(); arrList.Add("one"); arrList.Add("two"); arrList.Add("three");Now, to convert, use the ToArray() method −arrList.ToArray(typeof(string)) as string[];Let us see the complete code −Example Live Demousing System; using System.Collections; public class Program { public static ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
695 Views
To truncate a file in C#, use the FileStream.SetLength method.Here is the syntax −public override void SetLength (long value);Here, int64 = Length of the streamValue < current LengthIf the value is less than the current length of the stream: The stream is truncated. If the current position is greater than ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
81 Views
Basically, there are two kinds of events for which we need to specify the schedule −One-time eventOne-time event means it will be executed only once on a particular schedule. If we want to create a one-time event then we need to put the following syntax after ON SCHEDULE clause −AT ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
183 Views
Firstly, set an array and initialize it −int[] arr = new int[] {34, 56, 12};To loop through all the elements of an array −for (int i = 0; i < arr.Length; i++) { Console.WriteLine(arr[i]); }Let us see the complete code −Exampleusing System; public class Program { public static ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
3K+ Views
To initialize a string to an empty list −string myStr = null;Now, use the built-in method IsNullOrEmpty() to check whether the list is empty or not −if (string.IsNullOrEmpty(myStr)) { Console.WriteLine("String is empty or null!"); }Let us see the complete code −Example Live Demousing System; namespace Demo { class ... Read More