private Vector addTwoVectorsExample() {
// Create two Vector structures.
Vector vector1 = new Vector(20, 30);
Vector vector2 = new Vector(45, 70);
Vector vectorResult = new Vector();
// Add the vectors together.
// vectorResult is equal to (65, 100).
vectorResult = Vector.Add(vector1, vector2);
return vectorResult;
}
当我声明时,它会在向量中显示错误vector1 = new Vector(20,30);
如何在 C#中调用vector。