Different default ExactSpelling values ​​between C # and VB.NET. What for?

One of the subtle language differences between C # and VB.NET is whether to DllImportAttributeuse the methods used to invoke the Win32 API on methods declared with the symbol “A” or “W” in their identifier (symbol means ANSI encoding or Unicode encoding .) More precisely, any language allows you to either practice, but the default value of the parameter DllImportAttribute.ExactSpelling is different in language .

Now I am surprised by this because I associate C # with a more machine-friendly, case-sensitive identifier matching and VB.NET with a more human-centered case-insensitive identifier matching, and now this is the case where C # allows me to have a weaker match, than VB.NET by default.

What is the logic of this language difference?

+4
source share
1 answer

In my opinion, if you look back: C ++ is case-sensitive and C # get a lot from this language, I think to facilitate the work of C ++ developers in C #;) VB.NET gets more from the Visual Basic and Basic languages

0
source

Source: https://habr.com/ru/post/1672924/


All Articles