Answers for "struct in c#"

C#
1

structure in c sharp with example

Book 1 title : C Programming
Book 1 author : Nuha Ali
Book 1 subject : C Programming Tutorial
Book 1 book_id : 6495407
Book 2 title : Telecom Billing
Book 2 author : Zara Ali
Book 2 subject : Telecom Billing Tutorial
Book 2 book_id : 6495700
Posted by: Guest on October-17-2020
0

C# struct

struct student
{
    public int s_id;
    public String s_name, c_name, dob;
}
class Program
{
    static void Main(string[] args)
    {
        student[] arr = new student[4];

        for(int i = 0; i < 4; i++)
        {
            Console.WriteLine("Please enter StudentId, StudentName, CourseName, Date-Of-Birth");


            arr[i].s_id = Int32.Parse(Console.ReadLine());
            arr[i].s_name = Console.ReadLine();
            arr[i].c_name = Console.ReadLine();
            arr[i].s_dob = Console.ReadLine();
       }
    }
}

 student thisStudent;
 Console.WriteLine("Please enter StudentId, StudentName, CourseName, Date-Of-Birth");
 thisStudent.s_id = int.Parse(Console.ReadLine());
 thisStudent.s_name = Console.ReadLine();
 thisStudent.c_name = Console.ReadLine();
 thisStudent.s_dob = Console.ReadLine();
Posted by: Guest on November-14-2021
0

structure in c sharp with example

struct Books {
   public string title;
   public string author;
   public string subject;
   public int book_id;
};
Posted by: Guest on October-17-2020

C# Answers by Framework

Browse Popular Code Answers by Language