Search code examples
c#code-conversion

Need some help converting VB.NET code to C#


I have a CRC class written in VB.NET. I need it in C#. I used an online converter to get me started, but I am getting some errors.

byte[] buffer = new byte[BUFFER_SIZE];
iLookup = (crc32Result & 0xff) ^ buffer(i);

On that line, the compiler gives me this error:

Compiler Error Message: CS0118: 'buffer' is a 'variable' but is used like a 'method'

Any ideas how I could fix this?

Thanks!


Solution

  • Change buffer(i) to buffer[i]