LEADTOOLS Support
General
LEADTOOLS SDK Examples
How-To: Use Code Snippets in Visual Studio with LEADTOOLS
#1
Posted
:
Friday, September 15, 2017 3:19:14 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 163
Was thanked: 9 time(s) in 9 post(s)
This post is about a feature in Visual Studio called code snippets that can be used to insert commonly-used code blocks, such as "for" loop declarations and switch statements. Familiarity with these code snippets can facilitate development when using the LEADTOOLS SDK.
For example, a template for a "for" loop can be inserted by typing "for" and pressing the TAB key twice. This generates a template in which the iterator and halt condition can be specified and also navigated between by using TAB. These fields are highlighted in the screenshot shown. In this case, this makes it easy to insert the code necessary to iterate over the pages in a RasterImage. Once these fields have been denoted, striking "Enter" will move the insertion point to inside the code block. (Note that RasterImages are 1-based in their indexing and therefore the iterator will need to begin at 1 or be offset.)
The switch statement can be used in a similar fashion. When using code snippets with a switch when the underlying type is an enumeration, case statements will be automatically generated for the enumeration. Here's the results when using code snippets to generate a switch statement using the rasterImage.Order property. This can alleviate the effort behind implementing the entire switch statement manually.
For a list of code snippets that acn be used in Visual Studio, see this information from Microsoft.
https://msdn.microsoft.com/en-us/library/z41h7fat.aspxEdited by moderator Thursday, November 2, 2017 8:23:02 AM(UTC)
| Reason: Not specified
Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
General
LEADTOOLS SDK Examples
How-To: Use Code Snippets in Visual Studio with LEADTOOLS
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.