Here i have connected my raspberry pi to my laptop using the ethernet cable.
Inside the raspberry pi boot SD card i have opened the file cmdline and added the following information at the end of the file.
connect:Network in unreachable
The feature you need is called "Internet Connection Sharing". From the Network and Sharing Center, select "Change Adapter Settings". Select your Internet connection and pull up its properties page. Click on the "Sharing" tab. Check "Allow other network users to connect through this computer's Internet connection". Select the network interface that connects to the Pi as the interface to share on.