CSharp examples for Custom Type:struct
Use method in structure to initialize its member fields
using System;// w w w. j av a 2s .c om public struct Simple { public int i; private string s; public void init() { i = 10; s = "Hello"; } } public class T { public static void Main() { Simple simple = new Simple(); simple.init(); } }