Yes, those will be visible to other classes that instantiate the object you are using.
I too was a long time embedded programmer who jumped into PC development. I also am using serial ports HEAVILY in .NET.
A suggestion for you:
Abstractions are a good thing. For example, I have a wireless device that uses 900MHz to communicate. This device has a companion (Aerocomm antenna) that attaches to a PC through a serial port. So, instead of accessing serial ports through out my software, I encapsulated the functionality into one class (object). So, the Aerocomm antenna class has all the stuff for the serial port contained within it. It exposes functions to other classes in order to communicate with the Aerocomm antenna - like configuring it, setting what device to communicate with, set it into broadcast mode, etc.
In your case, you are communicating with a device. I would create a class that represents the device. Then, create functions within the class that will get abstracted data from the device. So, for example, say you want to get the version number of the device. You would have a function in your class like:
// Code to get the version number from the device, including the serial port commands, etc.
This function could also possibly be a property as well, but it would still have functional code in it.
Basic idea is to keep the accesses and functionality where it needs to be. This is a fundamental idea behind object-oriented programming.
Oh and one other thing - USB-Serial devices can cause exceptions when pulled out of a computer while the serial port is open. You will need to be aware of that and handle that as well.
C# does not #include header files the way C and C++ do. Everything that's part of a class is (usually) in one file. You've already seen "partial" class that Visual Studio uses to separate forms into the file you edit, Form1.cs for example and the file it edits, Form1.designer.cs in this case.
For simpler programs, and to get started, I'd stick with using the same namespace throughout. Same with making classes public. There are reasons to use different namespaces and possibly classes that are not public, but let's not worry about that yet.
The build process is basically the same. Your various .cs file get compiled into .obj files and then all of those objects get linked into an executable (.exe) file. And if all goes well you execute it. Using Visual Studio the compliling and linking usually happens as a result of pressing F6 (see the Build menu.)
I often make very large prints from unexposed film, and every one of them turns out to be a picture of myself as I once dreamed I would be.
In a C# 2008 desktop application, I need change the application since all the users are moving from one domain to new domain. The current application does not let the user access information under the new domain name.
To accomplish this goal, I would like to see what roles have been setup for those users starting with myself.
To accomplish this goal, I would like to know how to access those roles.
I do know that when I look at: Thread.CurrentPrincipal.Identity.Name, I can access the person's name. I also know that if I use System.Security.Principal.WindowsIdentity.GetCurrent(), I get the same information.
However can you tell me in code how to access the subcategories in the following:
Can you tell me in tell or show me in code how to accomplish this goal?
If you are using Active Directory, you can use the System.DirectoryServices.AccountManagement API to find details about a user and the groups he's associated with. You might want to try that (requires you to import System.DirectoryServices into your project).
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Attempted to read or write protected memory"
Above exception occurs when i add following lines to my code.
ioxml = new PosDamAx.IoXml();
i have added reference to PosDamAx.dll
i have chosen the debugger as x86.
secondly i have uncheck suppress jit optimization box.
Also i want to share that the same code start running when i try it on another PC.
Both have installed VS 2010 and have same settings of debugger But the only difference is of architecture , code is running fine on 32bit while mine is 64bit.
I have windows form , which contains treeview.
When i drag node and drop on windows explorer, i want event which will give me windows exploer path. Where I actually end node drag.
Does any body have solution for same.