Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, September 15, 2017 3:24:14 PM(UTC)

Nick  
Nick

Groups: Registered, Tech Support, Administrators
Posts: 43


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.)
for.png

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.
switch.png

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.aspx
Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.
nick@leadtools.com
www.LEADTOOLS.com
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

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.

Powered by YAF.NET | YAF.NET © 2003-2017, Yet Another Forum.NET
This page was generated in 0.170 seconds.