Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rect, where is it?

Tags:

c#

rect

This drives me crazy, creating new console application project, then

// adding it as reference of course
using System.Windows;

// somewhere in method
var rect = new Rect(1, 2, 3, 4); // no Rect

The type or namespace name 'Rect' could not be found (are you missing a using directive or an assembly reference?)

What happens with Rect?

like image 937
Sinatr Avatar asked Oct 24 '25 04:10

Sinatr


1 Answers

You should add WindowsBase.dll as a reference to your project.

like image 159
Hamid Pourjam Avatar answered Oct 26 '25 17:10

Hamid Pourjam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!