- 1
C# Properties : Fill in the blanks to create a read-only property X. The return value of the accessor should be the square of x.
class A { private int x=8; public int X { get { return x ____ x; } } }
2 ответов
+ 3
you have to choose the operator that will give a squared value, I'll give you a hint, it's one of those:
+ * / -
+ 1
class A {
private int x=8;
public int X {
get { return x * x; }
}
}