Migrating VB.net to c#: Private m_State(,) As Integer - What is it?

  • Thread starter Thread starter Juan
  • Start date Start date
J

Juan

I'm migrating a VB.Net app to c# and found the following:

Private m_State(,) As Integer

If anyone knows what is the analogous in c#... is it an array?

Thanks,
Juan.
 
Juan,

Yes, it is. The declaration in C# would be:

// A two dimensional array of integers.
private int[,] m_State;

Hope this helps.
 
Juan,

Yes it is an array and in my opinion the most terrible one there exist.

In fact it is a collection or table.

Cor
 
If you're migrating non-trivial amounts of code, then you should really be
using a converter (download our Demo Edition at www.instantcsharp.com).

An example of one of the things that are hard to catch when converting by
hand:
- The operator precedence of VB's "Not" is dramatically different than C#'s
"!"

A good converter will automatically process these sort of subtleties.
Contrary to popular belief, conversion between VB and C# involves much more
than minor syntax changes. If you miss the non-trivial changes, you may get
your app to compile, but the run-time behavior will be different (the
operator precedence issue described above is just one reason for this).

But of course the main reason to use a converter is to avoid the
tremendously tedious work involved with manual conversion.
 
Back
Top