Hello Shanky11
Misunderstood your Question sorry for that?
Dim is used for declaring variables and allocate memory space
Private,protected or public are access modifiers.They will determine the accessibility of your variables whether it should be public or depending on the modifiers specified.
If you dont use access modifiers such Private,protected or public explicitly and just declare it as Dim date as datetime,then the variable will be private by default.
To omit Dim use you can use private date as Datetime, this variable will work in that class only and same logic applies for Dim date as Datetime
When you declare any other specific apart from private it will works as specifier
To summarize both declaration work the same way logicaly as both will behave as private variables
Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved
Shanky11, if this helps please login to Mark As Answer. | Alert Moderator