You need to add a reference to System.Drawing.dll
.
As mentioned in the comments below this can be done as follows:
In your Solution Explorer (Where all the files are shown with your project), right click the “References” folder and find System.Drawing on the .NET Tab.
More Related Contents:
- Can’t specify the ‘async’ modifier on the ‘Main’ method of a console app
- How to cancel Task await after a timeout period
- Show/Hide the console window of a C# console application
- Getting all types in a namespace via reflection
- How to stop C# console applications from closing automatically? [duplicate]
- how to run a winform from console application?
- Getting “type or namespace name could not be found” but everything seems ok?
- Is there a good way to convert between BitmapSource and Bitmap?
- How to run console application from Windows Service?
- C# namespace alias – what’s the point?
- “Could not load type [Namespace].Global” causing me grief
- Create Bitmap from a byte array of pixel data
- namespace naming conventions
- Startup.cs in a self-hosted .NET Core Console Application
- How to draw on a zoomed image?
- Why does computing factorial of relatively small numbers (34+) return 0?
- Is there a way to make a console application run using only a single file in .NET Core?
- How do I only allow number input into my C# Console Application?
- ThreadPool not starting new Thread instantly
- Drawing a Long String on to a Bitmap results in Drawing Issues
- Error message “CS5001 Program does not contain a static ‘Main’ method suitable for an entry point”
- Should ‘using’ directives be inside or outside the namespace in C#?
- Compile to stand alone exe for C# app in Visual Studio 2010
- Must declare the table variable @table
- How can I capture as bitmap only what a picturebox is displaying, without using “copy from screen”?
- How do I get a return value from Task.WaitAll() in a console app?
- How to Display a Bitmap in a WPF Image [duplicate]
- C# – How to check if namespace, class or method exists in C#?
- Use of Namespaces in C#
- Partial class in different namespaces