I have a struct like this:
public struct Response
{
public string Cmd;
}
And also in main I'm having this byte array:
Decode(StringToByteArray("0100002402433131000000000000000311"));
And then I have a decode function inside this function I want to do Take(5) and Skip (3) like this:
byte[] cmd = resp.Skip(5).Take(3).ToArray();
x.Cmd = Encoding.UTF8.GetString(cmd);
How can i make this Modular as i need to the same to many function that might be the position is different is there anyway that instead of using Take(3) or Skip (5) i can assign Variable to calculate this automatically?