Writing property of object to the console?

using UnityEngine;
using System.Collections;

public class Products : MonoBehaviour {
	public string Name { get; set;}
	public string Manufacturer { get; set; }
	public float CosttoPurchase { get; set; } //When buying from manufacturer
	public float AmountinPackage { get; set; }
	public float CostofProduct { get; set; } //When selling at shop
	public float Size { get; set; }
	public float Popularity { get; set; }
	public float Tier { get; set; }
	public Products (string name, string manufacturer, 
	                 float costtopurchase, float amountinpackage, 
	                 float costofproduct, float size, 
	                 float popularity, float tier) {		
		Name = name;
		Manufacturer = manufacturer;
		CosttoPurchase = costtopurchase;
		AmountinPackage = amountinpackage;
		CostofProduct = costofproduct;
		Size = size;
		Popularity = popularity;
		Tier = tier;
	Products toiletpaper1 = new Products ("Scotty", "Scotty", 2, 12, 0, 5, 80, 1);
	// Use this for initialization
	void Awake () {
		//Products toiletpaper1 = new Products ("Scotty", "Scotty", 2, 12, userSelect, 5, 80, 1);
	// Update is called once per frame
	void Update () {
		Debug.Log (toiletpaper1.???); //What do I put here??????

Im trying to get a property (name, manufacturer, costofproduct, etc) from the instance of Products, toiletpaper1, but when I try Debug.Log(tioletpaper1.Name) I get Nullreference error message. What am I supposed to put there?

On a side note, where would I go to learn a bit more about this topic? I am not too good with the programming vocabulary…

Turn on your console warnings!

When you did this before you commented it out:

void Awake () {
    Products toiletpaper1 = new Products ("Scotty", "Scotty", 2, 12, userSelect, 5, 80, 1);

You would have gotten this warning from unity:

“You are trying to create a MonoBehaviour using the ‘new’ keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). Alternatively, your script can inherit from ScriptableObject or no base class at all”

Which is exactly the information you need. The Product class you’re trying to write doesn’t look like a behavior - it’s not something that needs to have a Transform or have Update called on it regularly - so you can safely declare it as a normal class instead of a MonoBehaviour.

Oh, and the class represents a single product, so it should be named “Product” instead of “Products”. And instead of having comments that say “When buying from manufacturer” and “When selling at shop”, just rename your variables:

CosttoPurchase -> ManufacturerPrice
CostofProduct -> ShopPrice