Hello,
I am delving into OOP now and am having issues with creating properties. Below is my code. Basically what I did is created a custom class and am creating a property within that class. But what happens is it will put a red squiggly under 'Multiply' saying 'not all code paths return a value'. I've tried looking up this but not really finding the answer anywhere. I did try following an example but it still won't work. Not sure what I'm doing wrong. I appreciate any help.
public class Arithmetic
{
private string x { get; set; }
public string Multiply()
{
x = "";
}
}