Trường Phan
New member
Correct way to define object of sample class in which C# code will work correctly is:
A. abc s1 = new abc(1);
B. abc s1 = new abc();
C. abc s2 = new abc(1.4f);
D. abc s2 = new abc(1, 1.4f);
Code:
class abc
{
int i;
float k;
public abc(int ii, float kk)
{
i = ii;
k = kk;
}
}
B. abc s1 = new abc();
C. abc s2 = new abc(1.4f);
D. abc s2 = new abc(1, 1.4f);