public TResponse ExecuteCustomMessage<TResponse>(IModbusMessage request)
where TResponse : IModbusMessage, new()
what is the above means? I have never see anything like that before, although I’ve been coding in C# for couple of years now… It is supposed to be a function, but I am not sure what is this < > and keyword where and new() at the end…
It is a constraint on the TResponse generic type which implements the interface IModbusMessage and has a parameterless constructor.
Also, as others have pointed out, I recommend you read the generics docs (pointed to by SLaks in the comments).