c#.net - how to create an api using vs2010

8
Creating and Using APIs in Visual Studio 2010 and C# Mudasir Qazi - [email protected] 1 12-Dec-14

Upload: mudasir-qazi

Post on 09-Aug-2015

86 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: C#.Net - How to create an API using VS2010

1

Creating and Using APIs in Visual Studio 2010 and C#

Mudasir Qazi - [email protected]

Page 2: C#.Net - How to create an API using VS2010

Mudasir Qazi - [email protected] 2

Steps

Two major steps are following• Creating Library (API)• Using Library (API Functions)

12-Dec-14

Page 3: C#.Net - How to create an API using VS2010

Mudasir Qazi - [email protected] 3

Creating Library (.dll)

• Step 1: Add new Project to the solution.• Step 2: From the new menu select “Class Library” and give

appropriate name.• Step 3: Create “Class” here and define all your functions in

here and save.• Step 4: Build the solution.• Step 5: Your library(.dll) is created in Bin folder of your class

library project in solution.

12-Dec-14

Page 4: C#.Net - How to create an API using VS2010

Mudasir Qazi - [email protected] 4

Step 1

12-Dec-14

Page 5: C#.Net - How to create an API using VS2010

Mudasir Qazi - [email protected] 5

Step 2 & 3

12-Dec-14

Page 6: C#.Net - How to create an API using VS2010

Mudasir Qazi - [email protected] 6

Step 4

12-Dec-14

Page 7: C#.Net - How to create an API using VS2010

Mudasir Qazi - [email protected] 7

Using Library

• Step 1: Place that library in project (it could be same of difference project) folder (or any where you want) and add reference to your project.

• Step 2: include a using statement or give full name to create an object of that library.

• Step 3: Use your functions and enjoy! :D

12-Dec-14

Page 8: C#.Net - How to create an API using VS2010

Mudasir Qazi - [email protected] 8

Using Library

12-Dec-14