Point in System.Windows

mohammadbaldwin121

New member
Joined
May 29, 2018
Messages
3
Programming Experience
5-10
In the book "Programming C# 4.0", the type Point is declared in System.Windows, but the Visual Studio Express 2010 compiler consider it to be an error.
The code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

class Firefighter
{
public string Name { get; set; }
public void ExtinguishFire()
{
Console.WriteLine("{0} is putting out the fire!", Name);
}
public void Drive(Firetruck truckToDrive, Point coordinates)
{
if (truckToDrive.Driver != this)
{
return;
}
truckToDrive.Drive(coordinates);
}

This is the message
Error 1 The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)
Error 2 The type or namespace name 'Point' could not be found (are you missing a using directive or an assembly reference?)
 
System.Windows is used in WPF applications, or as documentation says System.Windows Namespaces
The System.Windows namespaces contain types used in Windows Presentation Foundation (WPF) applications,
 
Back
Top Bottom