rossmann-engineering / EasyModbusTCP.NET

Modbus TCP, Modbus UDP and Modbus RTU client/server library for .NET implementations
928 stars 402 forks source link

Events cannot be found using VB.NET #7

Closed scottpage closed 6 years ago

scottpage commented 6 years ago

The naming conventions used for the ModbusClient and ModbusServer work as intended in C#, because C# is case sensitive. The events are useless for VB.NET development because it is not case sensitive.

The following is an example taken from the source.

public delegate void NumberOfConnectedClientsChanged(); public event NumberOfConnectedClientsChanged numberOfConnectedClientsChanged;

This leaves VB.NET users with an error

Event 'numberOfConnectedClientsChanged' cannot be found

.

Please update your naming convention. Instead of just altering the case, please use a different name for the event and the delegate. Preferably add the word "Handler" to the end of a delegate and leave the Event named the way it is.

scottpage commented 6 years ago

Duplicate of #6

rossmann-engineering commented 6 years ago

Yes you are probably right and I updated that. I was aware of that problem, but I didn't want to loose compatibility to previous versions. But there will be some major changes anyway. Thanks for your contribution