i used the following code to concatenate two byte[] using override operator +.
but there is an error i cannot understand.
here is my method’s header
public static byte[] operator +(byte[] bytaArray1, byte[] bytaArray2){...}
Error text:
One of the parameters of a binary operator must be the containing type
how should i implement this?
You cannot define an operator for another class.
One alternative would be to create an extension method like so: