473,513 Members | 4,116 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1707
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1711
by: John Ortt | last post by:
Hi Everyone, hope you can help. Our company has recently migrated from NT and Access 97 to XP and Access 2003 and in the process a number of problems have surfaced. The team I work in are responsible for managing a number of databases, some of which are updated on a desktop machine and then copied to the networked drives. We overwrite...
5
1244
by: DotNet | last post by:
I'm trying to construct a header user control and would like to pass an integer to the control in order to display the correct on state for a menu. How does one pass an integer from an .aspx page to an .ascx page when the page loads? Thanks.
1
3374
by: Al | last post by:
Hi I am converting VB6 to VB. Net it is refereeing to DLL as follow. I am not sure how I can convert it to VB.Net statement. Declare Function Chain_DES Lib "chaindes.dll" (ByRef Data As Any, ByRef key As Any, ByVal TripleDES As Short, ByVal Blocks As Integer, ByVal method As Integer) As Integer Appreciate any suggestions, I tried...
2
7196
by: Jim in Arizona | last post by:
I'm learning form an ASP.NET 1.0 book and I tried out some code that returns this error: Compiler Error Message: BC30311: Value of type 'Integer' cannot be converted to 'ASP.multiclasses_aspx.VehicleKey'. Source Error: Line 106:
3
4085
by: guy | last post by:
found this oddity- copying a vb6 function with optional parameters and pasting it into a vb2003 class, for conversion purposes, it all works fine except that the collapsing "-" on the LHS goes away, only to return if "Optional" is removed. Strange. anyone else had this? guy
3
3374
by: John Salmon | last post by:
g++ complains about illegal access to a private member when the following is compiled with a private copy constructor for the class C. When the copy constructor is public, the program runs and demonstrates(?) that the copy constructor is never called (at least no sign of its chatter on std::cout is visible). So - is it necessary to have a...
4
2145
by: bubbles | last post by:
Hi Guys n Gals, I am going to migrate an Access VBA application to SQL Server 2005. Essentially, what I need to do is to: * open a recordset * grab the ModelID and Age into variables * and use these variables to compare with the next record then mark the current and previous records with the appropriate values.
21
2875
by: no1zson | last post by:
I do not even know how to correctly ask this question. I have an item field in the code I am about to post. Simple intger meant to be an item number for a cd. The user enters this number. Over the last week I have played with Add buttons, Del buttons, Modify and everything else and it brought to light a problem I want to address today. I have...
0
7270
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4757
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3252
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.