Link to home
Start Free TrialLog in
Avatar of mastiSoft
mastiSoft

asked on

Pass byte array to not static function in class

Hi.
I have to send a byte array to class (class take care about all communication with FTDI) . Unfortunately I can't use static function to do that
 public static void st_SendCommand(ref byte[p,int iSize) will not work because of FTDI dll restrictions. I resolved this situation in other cases when it wasn't array as argument by calling not static function from static and it works. But it is not working with array. I need to send array and size of array to my class  and it those parameters have to be used in some not static function.
How can I do that?
ASKER CERTIFIED SOLUTION
Avatar of Misha
Misha
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It should work without problem.  Basically put the static keyword means that you do not need to create a separate object of that type which is distinct from a second object of the same type.  The static 'shares' the function.

Put another way.
Anything like
public static XXX foo(params) can also be coded as public XXX foo(params).  There is no restriction on the type of variables you use in params.
Avatar of mastiSoft
mastiSoft

ASKER

Thank you very much for your help.
Glad to help you!