Ans: In C#, an index array begins at zero. That indicates that an array's first item begins at 0th. The last item on an array is set to sum the number of elements - 1. Thus, if there are ten arrays, then the final 10th item is 9th position.
In C#, fixed length or Dynamic arrays can be defined.
A fixed array can save several objects present.
There is no specified size for a dynamic array. When you add new items to the array, the dynamic array size rises. A fixed-length or dynamic array can be declared. After a dynamic array is established, you may even alter it to static.
Let's have a look at Simple #'s array statements. The following snippet code defines the simplest dynamic integer array with no set size.
int[] intArray;
As you can see from the above code snippet, the declaration of an array starts with a type of array followed by a square bracket ([]) and the array's name.
The following code snippet declares an array that can store 5 items only starting from index 0 to 4.
int[] intArray;
intArray = new int[5];
The following code snippet declares an array that can store 100 items starting from index 0 to 99.
int[] intArray;
intArray = new int[100];
Ans: In finalize and dispose, both methods are used to free unmanaged resources. Finalize
Ans: The variables or methods publicly defined can be accessed anywhere in the program. Unless the instance class is established, static variables or methods defined are available globally. By default, the static member cannot be accessed globally based on the kind of access utilized. The compiler saves the method address as the input point and utilizes this information to begin execution before creating any objects. And Void is a type modifier that specifies that the method or variable does not return any value.
Ans: Custom controls are compiled code (DLLs) controls; they may be more easily used and added to the toolbox. Developers may drag and drop web-based controls. Attributes may, at the time of design. Multiple applications can be added with individual controls (If Shared Dlls). So, if it's personal, we may copy the reference and then utilize it in dll to the bin directory of the web application.
User Controls contain files that are quite similar to ASP and can be easily created. User controls cannot be put and dragged into the toolbox — they're dumped. They have both their design and their code. The user control file extension is ascx.
|