create prefab object grammatically using c#

This is my first day in unity c# coding. I want c# code for the following javascript

var createPrefab: GameObject;
var crate: GameObject = Instantiate(createPrefab, transform.position, transform.rotation);
crate.rigidbody.AddForce(Vector3(0,800,1500));

see the unity documentation for Instantiate, there are nice examples

@chubbspet thanks a lot.

Can you help me to get the amount of time for swipe? (means to recognise is it a small swipe or long swipe)