César Goulart

César Goulart

  • NA
  • 46
  • 2.7k

C# learning classes

Jan 3 2020 12:39 PM
Hi
i m learning classes
and every tuturial i read the code is like this
 
class:
  1. namespace WindowsFormsApp8  
  2. {  
  3.     class Triangulo  
  4.     {  
  5.         public int A;  
  6.         public int C;  
  7.         public int D;  
  8.     }  
  9. }  
 program:
 
  1. static void Main()    
  2.    {    
  3.   Triangulo X, Y;  
  4.            X = new Triangulo();  
  5.            Y = new Triangulo();  
  6.   
  7.            Y.A = 5;  
  8.   
  9.            Console.Write( Y.A);  
  10.         }  
 how can i put this in text fields or labels? thanks

Answers (3)