Making an item class in Unity.

I’m best with javascript and I’ve learned to write classes something like this:

function Item(name, description) { = name;
     this.description = description;

     this.use = function use() {
          //Do something

:stuck_out_tongue: I believe this is incorrect in Unity, as it doesn’t work. How can I do something like this? I aim to do everything I’ve shown above. (Item class, properties for items, and attaching a function.)

You do it the same way as ActionScript3:

class Item {
    var name : String;
    var description : String;
    function Item (name : String, description : String) { = name;
        this.description  = description;

    function Use () {
        // do something