I had this three classes:
Start.cs:
---------
using System;
using System.Windows.Forms;
namespace Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
static void Main(string[] args)
{
Uruchom();
}
public static void Uruchom()
{
Book written = new Book();
Book bought = new Book();
written.Author = "Test";
}
}
}
Variables.cs:
-------------
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
public class Book
{
public string Title;
public string Author;
public short YearPublished;
public int NumberOfPages;
public char CoverType;
}
}
Checking.cs:
------------
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
private class Outside
{
private void SomethingElse()
{
Book written = new Book();
Console.WriteLine("Author: {0}",written.Author);
}
}
I want to see and edit variables from class Book in other classes. I want to do as simplest as possible. I had some experience in structural programming but some difficulty understand OOP programming in Visual Studio 2005 C# programming.