By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,314 Members | 1,721 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,314 IT Pros & Developers. It's quick & easy.

Overloading "-" operator: binary and unary

P: n/a
Hello,

I have the following code snippet that overloads the "-" operator:

// unary
public static Vector operator -( Vector v )
{
return new Vector( -v.X, -v.Y );
}

// binary
public static Vector operator -( Vector v1, Vector v2 )
{
return new Vector( v1.X-v2.X, v1.Y-v2.Y );
}

It compiles fine, but when I switch to "Class View" in "Solution Explorer"
both operators have a red exclamation sign and a message: "Unable to create
description".

Is it something wrong or just a weirdness of VS.NET 2003?

Thanks,
Leszek
Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.