The user of the nested class is script-specific, as shown below.
1) Organization of code in real situations when there is a special relationship between two objects. 2) Hiding a class inside another class so that you do not want the inner class to be used from outside the class in which it is created.
Suppose you have 2 classes called A and B, and class B depends on class A without class A, you cannot use class B @, this script you can use nested classes
According to my knowledge
The DataRow class is a nested class for a DataTable i.e. you cannot create a DataRow class before u declares an object of the DataTable class
source share