- 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
Samual Sam has Published 2492 Articles
Samual Sam
608 Views
To find the number of dimensions of an array, use the Rank property.arr.RankHere, arr is our array −int[, ] arr = new int[3, 4];If you also want to get the rows and columns it has, then use the GetLength property −arr.GetLength(0); arr.GetLength(1);The following is the complete code −Example Live Demousing System; ... Read More
Samual Sam
216 Views
The Count property in the ArrayList class counts the number of elements in the ArrayList.Firstly, add elements to the ArrayList −ArrayList arrList = new ArrayList(); arrList.Add(98); arrList.Add(55); arrList.Add(65); arrList.Add(34);Then get the count of the array list −arrList.CountThe following is the code to implement Count property in C# −Example Live Demousing ... Read More
Samual Sam
239 Views
Each variable in C# has a specific type, which determines the size and layout of the variable's memory the range of values that can be stored within that memory and the set of operations that can be applied to the variable.To declare variables − ;Let us see an example to ... Read More
Samual Sam
2K+ Views
A member function of a class is a function that has its definition or its prototype within the class definition similar to any other variable. It operates on an object of the class of which it is a member, and has access to all the members of a class for ... Read More
Samual Sam
719 Views
Multi-dimensional arrays are also called rectangular array. You can define a 3-dimensional array of integer as −int [ , , ] a;Let us see how to define a two-dimensional array −Int[, ] a = new[3, 3]The following is an example showing how to work with a multi-dimensional i.e. rectangular array ... Read More
Samual Sam
246 Views
Type casting is converting one type of data to another type. The two forms are −Implicit type conversion − These conversions are performed by C# in a type-safe manner. For example, are conversions from smaller to larger integral types and conversions from derived classes to base classes.Explicit type conversion− These ... Read More
Samual Sam
285 Views
Iterator performs a custom iteration over a collection. It uses the yield return statement and returns each element one at a time. The iterator remembers the current location and in the next iteration the next element is returned.The following is an example −Example Live Demousing System; using System.Collections.Generic; using System.Linq; ... Read More
Samual Sam
274 Views
Events are user actions such as key press, clicks, mouse movements, etc., or some occurrence such as system-generated notifications.The events are declared and raised in a class and associated with the event handlers using delegates within the same class or some other class. The class containing the event is used ... Read More
Samual Sam
11K+ Views
To declare and initialize a list in C#, firstly declare the list −List myList = new List()Now add elements −List myList = new List() { "one", "two", "three", };Through this, we added six elements above.The following is the complete code to declare and initialize a list in ... Read More
Samual Sam
251 Views
C# delegates are similar to pointers to functions, in C or C++. A delegate is a reference type variable that holds the reference to a method. The reference can be changed at runtime.Syntax for declaring Delegates −delegate Let us now see how to instantiate delegates in C#.Once a ... Read More