|
using System;
struct phonebook1
{
public string name;
public string phone;
public uint age;
struct address
{
public string city;
public string street;
public uint no;
}
}
class test
{
public static void Main ()
{
phonebook1 p1;
p1.name = "Little Red";
p1.phone = "1234567";
p1.age = 26;
Console.WriteLine ("Name: {0}, Phone: {1}, Age: {2}!", P1.name, p1.phone, p1.age);
}
}
Q: How do I assign values to members in address?
Thank you |
|