Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace StaticApp
- {
- class Student
- {
- public string Name;
- public static string Prenume;
- public void printable()
- {
- Console.WriteLine("{0} {1}", Name,Prenume);
- }
- }
- class Program
- {
- static void Maine(string[] args)
- {
- Console.WriteLine("hgaethaeth");
- }
- static void Main(string[] args)
- {
- Console.WriteLine("aerg");
- Student student = new Student();
- student.Name = "Adi";
- //// the static variable can not be accessed, the static variable can be accessed
- //student.Prenume = "G";
- student.printable();
- Console.ReadKey();
- }
- }
- }
Add Comment
Please, Sign In to add comment