namespace Student.Form_s { public partial class AddEdite : Form { public AddEdite() { InitializeComponent(); } unsafe public struct student { public fixed char Name[126]; public fixed char Family[126]; public int ID; public float mark; public student* next; }; public student* start; private void button1_Click(object sender, EventArgs e) { student m = new student(); unsafe{ if(start==null) { start = &m; start->Name[126] = textBox1.Text.ToCharArray(); MessageBox.Show(Convert.ToString(start->Name)); } } } } }
unsafe
System.Runtime.InteropServices.Marshal
fixed
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)