In C# you can not return two values from methods. It's better two return an array or some collection type which allows to hold more values than one.
Maybe something like this:
public static decimal[] SpecialPrice(decimal w, decimal p)
{
if (w < p)
{
return new decimal[] { p };
}
else if(w > p && p > 0)
{
return new decimal[] { w, p };
}
else
{
return new decimal[] { w };
}
}
If it's important to know which value is which after this method executes, you could use more sophisticated collection classes like the Dictionary class which lets you refer to each of its values by name.
I wouldn't create a new struct or class in this situation as I think the array size is a really easy indication of how many values are being returned where classes and structs will have the same number of variables before calling this method and after, making it harder to tell how many values were returned.