I tried using a cobra .dll from C# and Boo.
It works great, except for a little problem:
If I instantiate a class that has a member called "name", when used from C# I must use it capitalized ("Name").
Otherwise it is not recognized.
When used from Boo, I get this error:
"'name' is not a member of 'Dude'. Did you mean 'Name' ? (BCE0019)"
neuruss
Forums
capitalized member names
4 posts
• Page 1 of 1
Re: capitalized member names
This is normal.
C# programmers will expect that member names are capitalized. For example, a C# programmer will write "someList.Count" and "Console.WriteLine(...)". So in order that your Cobra libraries can be comfortably consumed by C# programmers, Cobra capitalizes the underlying members. When using the same DLL from Cobra, you would still start with lowercase. And I guess from VB, you could start with anything.
C# programmers will expect that member names are capitalized. For example, a C# programmer will write "someList.Count" and "Console.WriteLine(...)". So in order that your Cobra libraries can be comfortably consumed by C# programmers, Cobra capitalizes the underlying members. When using the same DLL from Cobra, you would still start with lowercase. And I guess from VB, you could start with anything.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: capitalized member names
Am I correct to assume that enumerations will always be PascalCased?
# .None is PascalCased because it is an enumeration
.formBorderStyle = FormBorderStyle.None
# .black is camelCased because it is a class
.backColor = Color.black
- AlGonzalez
- Posts: 13
- Location: Greenville, SC - USA
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 25 guests