Reputation: 17
I would like to calculate with vectors in C# and this Site told me to code like this:
Vector v = new Vector();
I am using:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
using System.Windows.Input;
using System.Windows;
Anyway it does not work "Type or namespace could not be found" ...
Upvotes: 0
Views: 321
Reputation: 9782
First, check the documentation for Vector
, for example google .Net Vector
This will give you a MSDN page with the documentation of struct Vector.
Look at this MSDN site for namespace
this tells you that Vector
resides in the Systems.Windows namespace.
This means you need a
using System.Windows;
line at the beginning of your code.
Furthermore the docu says that this type is in Assembly WindowsBase.dll
.
This means you must add WindowsBase.DLL
to the References of your project.
Upvotes: 1