static void Main(string[] args) { var instance02 = new Phil(); instance02.someNumber = 22; Console.WriteLine("Hello World! " + instance02.someNumber); }
public IActionResult Index() { Phil cloneOne = new Phil() { Name = "Lihp" }; Console.WriteLine($"Phil class name is: {cloneOne.Name}"); Console.WriteLine($"Phil class height is: {cloneOne.Height}"); return(View(cloneOne)); }
public PhilView(bool scalable,bool synchronous) { this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); Size = new Size(600, 620); Graphics g = Graphics.FromImage(offscreen); g.Clear(Color.Black); Text = (scalable) ? "SCALABLE" : "LOCKBASED"; Text += (synchronous) ? " SYNC": " ASYNC"; var howmany = Constants.howmany; Table = new Table(howmany, stopwatch, scalable,synchronous); sprites = new IViewable[2 * howmany]; for (int i = 0; i < 2 * howmany; i += 2) { sprites[i] = new Fork(i / 2, Table); } for (int i = 1; i < 2 * howmany; i += 2) { sprites[i] = new Phil(i / 2, Table); } angle = 360f / sprites.Length; }