Saving/Loading Arrays to file?

My inventory based on Array : inventory*[k]. How can i save this array to file? In array i have:*
public class InventoryItem
var worldObject: GameObject;
var itemIcon: Texture;
var itemName : String;
var itemDescription : String;
var Stack : int;
var MaxStack : int;
I need it to save game. Thank you guys!

You need Serializable attribute on your class: