By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,024 Members | 2,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,024 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Juan,

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

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

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Juan" <ju*****************@ANTISPAMhotmail.com> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
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.

Nov 16 '05 #2

P: n/a
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
Nov 16 '05 #3

P: n/a
This is a multi-dimensional array.

private int m_state[,];
--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Juan" <ju*****************@ANTISPAMhotmail.com> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
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.

Nov 16 '05 #4

P: n/a
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.
"Juan" wrote:
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.

Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.