I want to use the Rect
Struct and I write Rect aaa = new Rect();
and I get the type or namespace could not be found
error. I try adding all the using
s as in the example of the web:
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;
and I get in that the last three imports a the type or namespace Shapes does not exist in the namespace System.Windows. (are you missing an assembly reference?)
.
At the webpage mentioned, it says the assembly is WindowsBase.dll
. And now I don't know how to go on...
UPDATE: I've been told to add a reference, but it's a Core project and that's not possible.
I should install a package but I don't see any package containing this dll. The package WindowsBase is not valid for .net 5, but in the documentation above it says this Struc can be used indeed with .net 5.
I want to use this struct.