trouble with AsyncState

  • Thread starter Pascal Schmidt-Volkmar
  • Start date
P

Pascal Schmidt-Volkmar

Hi there,

my line of code "private AsyncState State;" returns the error:

Error 1 The type or namespace name 'AsyncState' could not be found (are you
missing a using directive or an assembly reference?) C:\Dokumente und
Einstellungen\Pascal\Lokale Einstellungen\Anwendungsdaten\Temporary
Projects\Mailprogramm\Form1.cs 27 17 Mailprogramm

although I have inserted system.Runtine.Remoting.Messaging.

I am using the C# Express version.

What is wrong??

Pascal
 
S

Simon

As well as adding the reference have you added a using clause at the top
of the code file.

ie

using System.Runtime.Remoting.Messaging.

Also I note that in your example system is not capitalised. C# is case
sensitive so your must spell System with the capital. system and System
are two different references to C#

Cheers

Simon
 
S

Stoitcho Goutsev \(100\) [C# MVP]

Pascal,

I don't see AsyncState clas in System.Runtime.Remoting.Messaging neither in
any other namespace in the .NET framewrok. There is AsyncResult class
though. There is AsyncState property, but not class.

Are you sure this is the class you want to use?
 
P

Pascal Schmidt-Volkmar

Hi Stoitcho,

you are right, I made a mistake. It's not a class of System... , it is
self-made and I forgot to include it...

Thanks anyway!

Pascal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top