- 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
George John has Published 1167 Articles
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
891 Views
Private MethodsTo set private methods, use the private access specifier.Private access specifier allows a class to hide its member variables and member functions from other functions and objects. Only functions of the same class can access its private members. Even an instance of a class cannot access its private members.Final ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
72 Views
Declaring an array does not initialize the array in the memory. When the array variable is initialized, you can assign values to the array.Array is a reference type, so you need to use the new keyword to create an instance of the array. For example, assign the values like the ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
3K+ Views
finalJava has final keyword, but C# does not have its implementation. For the same implementation, use the sealed keyword.With sealed, you can prevent overriding of a method. When you use sealed modifiers in C# on a method, then the method loses its capabilities of overriding. The sealed method should be ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
175 Views
While declaring a method, if you are not sure of the number of arguments passed as a parameter, then use the C# param arrays.The following is the complete example to learn how to implement param in C# −Exampleusing System; namespace Program { class ParamArray { ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
2K+ Views
The default access for a class member in C# is private.Member variables i.e. class members are the attributes of an object (from design perspective) and they are kept private to implement encapsulation. These variables can only be accessed using the public member functions.Exampleusing System; namespace RectangleApplication { class ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
362 Views
List collection is a generic class and can store any data types to create a list. To define a List −List l = new List();To set elements in a list, you need to use the Add method.l.Add("One"); l.Add("Two"); l.Add("Three");An array stores a fixed-size sequential collection of elements of the same ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
423 Views
Boxing convert value type to an object type. Let us see an example of boxing −int x = 50; object ob = x; // boxingIn boxing, the value stored on the stack is copied to the object stored on heap memory, whereas unboxing is the opposite.Boxing is useful in storing ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
571 Views
A file is a collection of data stored in a disk with a specific name and a directory path. When a file is opened for reading or writing, it becomes a stream.In C#, you need to create a FileStream object to create a new file or open an existing file. ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
577 Views
Use the Array.Count property in C# to count the number of items in a list in C# −Set the listList myList = new List() { "electronics", "clothing", "appliances", "accessories" };Now count the number of items in a list in C# −myList.CountThe following is the complete code ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
889 Views
To compare dates in C#, you need to first set two dates to be compared using the DateTime object. We will use the DateTime class in C# −Date 1DateTime date1 = new DateTime(2018, 08, 05); Console.WriteLine("Date 1 : {0}", date1);Date 2DateTime date2 = new DateTime(2018, 08, 07); Console.WriteLine("Date 2 : ... Read More