How to inherit class in VB.NET
vb.net
Solution
Put it in the next line:
Public Class DataGridViewEx
Inherits DataGridView
End Class
MSDN: Inherits
If used, the Inherits statement must be the first non-blank, non-comment line in a class or interface definition. It should immediately follow the Class or Interface statement.
Problem
I'm pretty new to VB and I want to inherit from `DataGridView`, I use something like ``` Public Class DataGridViewEx Inherits DataGridView End Class ``` But compiler generates an error as `End of statement expected` pointing to `Inherits DataGridView`. What is wrong and how I should do this?