468,293 Members | 1,845 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,293 developers. It's quick & easy.

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

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
4 1521
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
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
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
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.

Similar topics

4 posts views Thread by John Ortt | last post: by
5 posts views Thread by DotNet | last post: by
2 posts views Thread by Jim in Arizona | last post: by
3 posts views Thread by John Salmon | last post: by
4 posts views Thread by bubbles | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.