How to use VB.NET Default marked properties in C# code
It is always painful to move from one language to other language for a programmer and the main problem is syntax.
I have faced lot of problem while moving from C# to VB.NET and when trying to sync both languages. I was trying to access a property from a DLL which was written in VB.NET to C# code. The property was marked as default and it was not available in C# code. I was aware of indexers in C# which is equivalent to default keyword of vb.net but I was not aware about this that we can call the defaulted vb.net properties in c# as an indexer.
But it helps me lot after lot of googling … So I just want to share this thing to all of you.
Suppose the default property written in vb.net code is “GetConfigValue” then in c# code we can call this as GetConfigValue[“InputValue”] that’s it..
Hope it will help you all …
Regards,
Dharmendra Kumar
Comments
Post a Comment
Thanks for your valuable feedbacks.Keep visiting the blog...