Nullable types in C# and VB.net
Have you ever try to assign null to int value in C# or VB
Both language has totally different behavior. VB allows you assign Nothing but it will translate to zero on the other end C# throws error “type is not nullable”
Here is how you can set Integer to Null value in Both languages
Visual basic.net
Dim i as Integer=Nothing '//Works but set i=0 Dim i as Integer?=Nothing '//Works set i=Nothing
C#
int i =null '//ERROR: type not nullable int? i =null '//Works set i=null

![SSAS Cube Deploy/Processing Error – OLE DB or ODBC error: Login failed for user ‘[MyServer1\user1$]’.; 28000](https://binaryworld.net/blogs/wp-content/uploads/2014/04/ssas-analysis-service.png)



Leave a Reply
You must be logged in to post a comment.