Which of the following is the correct way to settle down values into the structure variable 'e' defined in the following C# code snippet?
struct emp
{
public String name;
public int age;
public Single sal;
}
emp e = new emp();
struct emp
{
public String name;
public int age;
public Single sal;
}
emp e = new emp();A.
e.name = "Jone";
e.age = 24;
e.sal = 200;B.
With emp e
{
.name = "Jone";
.age = 24;
.sal = 200;
}C.
name = "Jone";
age = 24;
sal = 200;D. All of the mentioned
Answer: Option A

Join The Discussion