Is this possible? I'm using Visual Studio Enterprise Edition and I do have Visio 2002 installed here as well. I know how to use UML to create the diagrams, I just don't know where the code generation feature is...
*->>Always working on my game, teach me
cout << "dav1d\n";
here is my problem: i need a certain class to be used in a webmethod an a client. In order to do so i made a little library called ChatLib containing the class ChatMsg. Both, webservice and client, have the line "using Chatlib;", but the proxy (which is generated by the Visual Studio) seems to do something different.
The Compiler tells me that he is not able to convert 'chatclient02.localhost.ChatMsg' to 'ChatLib.ChatMsg' (referring to a line in the windows form, where i want to start the webmethod).
(in german: "Implizite Konvertierung des Typs 'chatclient02.localhost.ChatMsg' zu 'ChatLib.ChatMsg' nicht möglich.")
exchanging the line "using Chatlib;" by "using chatclient02.localhost;" in the client makes the compiler happy but the program does not run properly which means that there are system exceptions thrown.
i would be grateful for every answer especially those, that support the usage of Visual Studio.NET
PS: I already posted this one on another board, which was probably the wrong address. If this is true for this board, too, i might be happy getting an answer such as: "this is the wrong board, try this: ...".
I found a solution when i made a little exsample application concentrating on this whole using library business (for a prof who did not quite understand my problem):
It turns out to run properly when i refer to ChatMsg as localhost.ChatMsg (i think it's the namespace of the proxy) not using or refering any ChatLib in the client. This might not have worked for the original purpose because of the messy code, i have to tidy it up i guess
Hi! I've been working with C# for a while now but have hit a few snags...I would sure like info about the following things:
1. Hardware and C#
2. Accessing hardware serial numbers in C#
3. Computer System Hardware Classes and C#
4. Accessing Win32_BIOS - Win32_DiskDrive functions in C#
5. How to get a list of functions contained in a DLL file
Any help would be appreciated and thanks for the time spent on answering this beforehand...
For anything Win32 related you should go to MSDN[^] and check out Eric Gunnerson's latest article. He has a really good explanation of how to do Win32 stuff from C#.
As for the hardware related issues...I don't think you can do that in C#. I believe you would have to use, again, the Win32 API. However, you may not even be able to do that(You might have to go all the way down to Assembler).
And lastly, as for the DLL. You can use the System.Reflection.Assembly class to load a DLL and examine it's properties and methods. Even if it's a COM DLL, then .NET will create a wrapper for you and you'll be able to see the info that you want.
Properties are a replacement for all those get/set methods we have in C++ / Java. It also allows you to expose a different type than the field you setting. AFAIK any fields should be never be public.
Hope this helps
"There are no stupid question's, just stupid people."
Yeah, its best to use properties rather than public fields. A property acts as an encapsulation around and a buffer between a classes private fields and the function accessing them.
Where with a public field all you can do is get and set:
public int ABool = 0;
Test t = new Test();
t.ABool = 1;
A property allows you to do many things before the field itself is set. A property also allows you to restrict the access to a field, allowing only getting or setting, if that is what your class requires:
private int aBool = 0;
public int ABool
// restrict the value of aBool to positive and zero
if (value >= 0)
aBool = value;
Test t = new Test();
t.ABool = -1;
Last Visit: 31-Dec-99 19:00 Last Update: 6-Feb-23 16:16