-2

While coding a server, I came across something that I didn't recognize, which is byte[][].

What does this syntax mean, and how do I get rid of the message?

enter image description here

halfer
  • 19,824
  • 17
  • 99
  • 186
  • 1
    It's an array of byte arrays. Why do you want to get rid of it? – vc 74 Mar 11 '18 at 07:06
  • It is a [Jagged Array](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/arrays/jagged-arrays). Your code (`CopyTo`) shows a List of arrays that is copied to an array of arrays – Peter Bons Mar 11 '18 at 07:06
  • It's a jagged byte array (an array of arrays). You probably don't want to get rid of it as it most certainly serves a purpose even if you're able to detect a code smell about it. Edit: lol at all the identical answers posted at the same time – oscilatingcretin Mar 11 '18 at 07:06
  • https://stackoverflow.com/questions/12567329/multidimensional-array-vs – Chetan Mar 11 '18 at 07:07
  • I wasn't aware of what it was, so I figured that it wasn't supposed to be there, but that is extremely helpful. If one of you could put that in an answer, I can upvote and accept it. – x otikoruk x Mar 11 '18 at 07:09

1 Answers1

2

It's a Jagged Array in C#. To be short, it's an Array of Arrays holding bytes.

halfer
  • 19,824
  • 17
  • 99
  • 186
Habeeb
  • 7,601
  • 1
  • 30
  • 33