Create Visual Studio Project
How to Create a Visual Studio Project using DocDigitizer WorldObjects
Setup Visual Studio Project
Open your Visual Studio.
Create a "Console Application" project.
*Note: for this demonstration, a "Console Application" project is sufficient, but you can use a NuGet package to provide DocDigitizer WorldObjects in other types of projects, considering the requirements of each case.
![Picture12.png 624](https://files.readme.io/c3ff0f0-Picture12.png)
Give the following name to the project: "TestDocDigitizerWorldObjects."
![Picture13.png 624](https://files.readme.io/7d89c23-Picture13.png)
Install NuGets
Install the two NuGet packages on your Visual Studio project that you created.
- DocDigitizer.SemanticObjects.MyObjects.MyBuild.1.0.0.nupkg
- DocDigitizer.ServiceAPI.1.0.4.nupkg
Go to your project and on "Dependencies," select "Manage NuGet Packages."
![Picture15.png 516](https://files.readme.io/9d8f23c-Picture15.png)
Because your NuGets are local folders, one way to access them is to create a new "Package Source."
Point the "Package Source" that you are creating to the folder where you previously downloaded your NuGets.
![Picture14.png 624](https://files.readme.io/f0a8f80-Picture14.png)
From "Package Source" select the one that you created ("DocDigitizer") and then go to "Browser" and select and install the two NuGets.
![Picture16.png 624](https://files.readme.io/fe50610-Picture16.png)
Create Test Program
Add the following code to your class:
static void ShowCatalog()
{
Gender[] genders = Catalog<Gender>.GetAll();
Console.WriteLine($"Currency from Local catalog: ");
for (int i = 0; i < genders.Length; i++)
Console.WriteLine($"{genders[i].Code} | {genders[i].Description}");
}
static void Main(string[] args)
{
ShowCatalog();
}
This function "ShowCatalog" will write the list of all genders that you have on the catalog to the console.
You can download the solution at the link below:
Updated over 2 years ago