Collection Initializers Color class using System.???

Reply Forum
Forum postJohn Hamill @ 2011-05-17 19:21:34
ReplyReply to
http://csharp.net-tutorials.com/csharp-3.0/collection-initializers/

I was doing the C# tutorial (see above)
about

Collection Initializers

and a class

Color

was used.

I get a compiler error indicating that I am not
including a

using System.???

statement for the Class Color.

What should the "using" statement be for me to be able
to use the Color class?

I tried
using System.Drawing;
When I compile I get
"The type of namespace name 'Drawing' does not exist in the namespace 'System' (are you missing an assembly reference?)"

What is an assembly reference?

Do I need to link in a Drawing.dll some how?

How do I link in Drawing.dll?

Thanks

---
I found an answer:

http://en.csharp-online.net/CSharp_FAQ:_Am_I_missing_an_assembly_reference


Do a RClick in Solution Explorer on project name "HelloTutorial"
or
Do a RClick in Solution Explorer on project References tree item
"HelloTutorial"
"References"

Select Add Reference
Select .NET TAB
Scroll down to System.Drawing
Double click System.Drawing
This item will be added to the Solution Explorer in the following tree
"HelloTutorial"
"References"
...
"System.Drawing"
...













© net-tutorials.com 2006 - 2012

MailContact net-tutorials.com