Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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();


Comment

PREVIOUS NEXT
Code Example
Csharp :: c# get function name 
Csharp :: remove multiple items from list c# 
Csharp :: append multi lines to file linux 
Csharp :: system.net.mail send html message 
Csharp :: c# join strings with comma 
Csharp :: c# how to set string list 
Csharp :: c# picturebox transparente 
Csharp :: how to create public variable in c# 
Csharp :: c# display image 
Csharp :: add row and columns to grid wpf in code 
Csharp :: stringbuilder to string c# 
Csharp :: c# read all lines from filestream 
Csharp :: c# loop through dictionary 
Csharp :: c# string to bool 
Csharp :: Sort ListBox numerically in C# 
Csharp :: unity convert number to notation 
Csharp :: convert number of days into months c# 
Csharp :: how to set border for groupbox in c# 
Csharp :: C# round number of digits after decimal point 
Csharp :: how to add to a list in c# 
Csharp :: in c sharp how do you work the wait function 
Csharp :: c# loop class properties add to array 
Csharp :: unity lerp 
Csharp :: asp net img src path from database 
Csharp :: c# get all letters 
Csharp :: wpf datagrid get selected items 
Csharp :: C# get column of 2d array 
Csharp :: onmousedown() not working unity 
Csharp :: c# windows forms cancel event 
Csharp :: get index brushes properties c# 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =