In C++ I could use pointer arithmetic to grab everything from a start position to the end of an array. What do you do in C# to accomplish the same thing?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static string GetText(byte[] value, uint startPos)
{
// TODO - What goes here?
return "";
}
static void Main(string[] args)
{
byte[] value = new byte[] { 0x41, 0x42, 0x42, 0x42 };
string result = GetText(value, 1);
Console.WriteLine(result);
}
}
}
Expecting output: BBB