- 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
5K+ Views
Value Type and Reference, both are types in C# −Value TypeValue type variables can be assigned a value directly. They are derived from the class System.ValueType. The value types directly contain data. When you declare an int type, the system allocates memory to store the value.Value Type variables are stored ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
1K+ Views
First, set the two lists −List OneList < string > list1 = new List < string > (); list1.Add("A"); list1.Add("B"); list1.Add("C"); list1.Add("D");List TwoList < string > list2 = new List < string > (); list2.Add("C"); list2.Add("D");To find the difference between the two list and display the difference elements −IEnumerable < ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
733 Views
First, define and initalize an array −int[] p = new int[3] {99, 92, 95};Now, display the array elements −for (j = 0; j < 3; j++ ) { Console.WriteLine("Price of Product[{0}] = {1}", j, p[j]); }To acess any element, just include the index of the element you want like ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
155 Views
For object serialization, you need to refer the below code. Here, we have use the BinaryFormatter.Serialize (stream, reference) method to serialize our sample object.We have set a constructor here −public Employee(int id, string name, int salary) { this.id = id; this.name = name; this.salary = salary; }Now ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
96 Views
The types in C# include the following −Value TypesValue type variables can be assigned a value directly. They are derived from the class System.ValueType.The value types directly contain data. Some examples are int, char, and float, which stores numbers, alphabets, and floating point numbers, respectively. When you declare an int ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
328 Views
When you use sealed modifiers in C# on a method, then the method loses its capabilities of overriding. The sealed method should be part of a derived class and the method must be an overridden method.Let us see an example −The following example won’t allow you to override the method ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
89 Views
Use the translateX(x) method to transform the element using x-axis.Let us see the syntaxtranslateX(x)Here,x: It is a length representing the abscissa of the translating vector.Let us see an examplediv { width: 40px; height: 40px; background-color: black; } .trans { transform: translateX(20px); background-color: orange; }
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
2K+ Views
Generic List is a generic collection in C#. The size can be dynamically increased using List, unlike Arrays.Let us see an example −We have set the List first −List myList = new List()Now add elements in the list −List myList = new List() { "mammals", "reptiles", "amphibians" ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
5K+ Views
The stream is basically the sequence of bytes passing through the communication path. There are two main streams: the input stream and the output stream. The input stream is used for reading data from file (read operation) and the output stream is used for writing into the file (write operation).The ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
668 Views
Finalizers in C# are used to destruct instances of classes. With that, you can also use it to release resources.Here are some of the key points about Finalizers −Only one finalizer is allowed for a classYou cannot inherit or overload FinalizersA finalizer cannot have parametersFinalizers invoke automaticallyFinalizers in C# are ... Read More