• Products
  • Download
  • Purchase
  • Support
  • Company
Actipro Software company logo
Twitter Follow Actipro RSS Subscribe (RSS Feed)

The Actipro Blog

Tag Cloud

  • blog
  • docking
  • editors
  • intelliprompt
  • micro charts
  • navigation
  • propertygrid
  • ribbon
  • shared library
  • silverlight
  • syntaxeditor
  • themes
  • views
  • web site
  • winforms
  • winrt
  • wpf

Latest Twitter News

May 14, 2012 at 2:50 PM
IntelliPrompt code snippet features have been added to our VS-like code editor control for #WPF and #Silverlight. http://t.co/1IchOJrr

May 10, 2012 at 9:40 PM
Our new Micro Charts control products for #WPF and #Silverlight are out now. Come build some dashboards with them! http://t.co/EEERvff0

May 7, 2012 at 6:47 AM
Today we look at bar charts, for our upcoming #WPF, #Silverlight, and #WinRT Micro Charts product. http://t.co/gxHuPS6B

May 4, 2012 at 6:25 AM
See a gallery of micro area charts in our upcoming release for #WPF, #Silverlight, and #WinRT. http://t.co/qDXGwW8B

May 3, 2012 at 6:32 AM
See a variety of line charts that are easy to make with our upcoming #WPF, #Silverlight, #WinRT Micro Charts product. http://t.co/mbkX6tJd

Twitter Follow us on Twitter

Month List

  • 2012
    • May (9)
    • April (6)
    • March (11)
    • February (11)
    • January (2)
  • 2011
    • December (2)
    • November (7)
    • October (2)
    • September (1)
    • August (5)
    • July (3)
    • June (6)
    • May (5)
    • April (8)
    • March (4)
    • February (5)
    • January (9)
  • 2010
    • December (9)
    • November (10)
    • October (4)
    • September (8)
    • August (12)
    • July (9)
    • June (7)
    • May (6)
    • April (7)
    • March (6)
    • February (6)
    • January (4)
  • 2009
    • December (2)
    • November (2)
    • October (12)
    • September (3)
    • August (11)
    • July (10)
    • June (6)
    • May (3)
    • April (7)
    • March (6)
    • February (8)
    • January (10)
  • 2008
    • December (10)
    • November (2)
    • October (3)
    • September (5)
    • August (5)
    • July (8)
    • June (4)
    • May (4)
    • April (10)
    • March (8)
    • February (1)
    • January (2)

Category List

  • RSS feed for ActiproActipro (321)
  • RSS feed for Blog SummaryBlog Summary (15)
  • RSS feed for GeneralGeneral (43)
  • RSS feed for In developmentIn development (164)
  • RSS feed for New featuresNew features (155)
  • RSS feed for New productNew product (38)
  • RSS feed for PromotionPromotion (2)
  • RSS feed for SilverlightSilverlight (90)
  • RSS feed for Tips and tricksTips and tricks (4)
  • RSS feed for Visual Studio 2008Visual Studio 2008 (2)
  • RSS feed for Windows FormsWindows Forms (22)
  • RSS feed for Windows VistaWindows Vista (10)
  • RSS feed for WinRTWinRT (9)
  • RSS feed for WPFWPF (257)
  • RSS feed for XAMLXAML (23)

About Us

Actipro Software is a leading provider of .NET user interface controls for the WPF, Silverlight, and WinForms frameworks, and is most well-known for their SyntaxEditor syntax-highlighting code editor control.

Please take some time to learn more about us and our product offerings.

SyntaxEditor .NET Languages Add-on - Extension Methods

April 28, 2011 at 9:32 AM
by Bill Henning (Actipro)

PostBannerSyntaxEditorDevNotes

Today we completed another major milestone in the resolver implementation of the SyntaxEditor .NET Languages Add-on for WPF/Silverlight: support for resolving extension methods in C# and VB.

If you are interested in learning about other recent .NET Languages Add-on progress, please see our previous blog posts.

Let’s see some samples… 

Extension Methods Defined in Code

In this screenshot, we’ve defined a ToInt32 extension method in code.  Then down below we declare a num variable using the extension method invocation as an initializer.

ExtensionMethod1

When we hover over the WriteLine method, the resolver properly determines that num is an int (per the extension method call in its initializer) and then picks the correct WriteLine overload.

Let’s see a similar extension method define in VB code:

ExtensionMethod5

When hovering over ToInt32, we see that the extension method defined in code is picked up.

LINQ Extension Methods

Above in the code, we added using statements to import the System.Linq namespace.  We declare an array variable, which is an int array.

ExtensionMethod2

When we hover over the Average method call on the array variable, the resolver identifies that array implements IEnumerable<int> and thus picks the correct LINQ extension method from Enumerable.

Now let’s get even more complex.  We’ll declare a list variable that is a constructed generic type with a nullable double type argument.

ExtensionMethod3

When we hover over the Average method call on the list variable, the resolver identifies that list implements IEnumerable<double?> and thus picks the correct LINQ extension method from Enumerable.  Note that the result for this extension method is double? instead of double.

Just for comparison, now lets explicitly call that same extension method:

ExtensionMethod4

You can see how quick info now properly reveals the first parameter to the method.

Summary

Over the past few blog posts, we’ve see how new functionality gets layered on top of previously-added resolver functionality.  For instance in this post, we used type inference, generic type construction, and overload resolution features that were added in the past several weeks.  Everything is coming together very nicely.

We still have some more features to work out before we can get the automated quick info features out into the public, but we hope to post a call for closed beta testers soon so keep an eye on our blog.

Tags: wpf, silverlight, syntaxeditor, intelliprompt
Filed under: Actipro, In development, New features, WPF, Silverlight
Submit to DotNetKicks...
Permalink | Comments (1)

Related posts

SyntaxEditor .NET Languages Add-on's IntelliPrompt improvements  We just released build 276 of SyntaxEditor and its add-ons.  This build has more genera...New SyntaxEditor .NET Languages Add-on IntelliPrompt Features  The latest build of the .NET Languages Add-on released today includes some great new feature...SyntaxEditor .NET Languages Add-on for WPF Progress - Part 2 Today I’d like to post a status update on the progress of the SyntaxEditor .NET Languages Add-on...

Comments

July 1, 2011 at 00:22  

trackback

Actipro Blog 2011 Q2 Posting Summary

Actipro Blog 2011 Q2 Posting Summary

The Actipro Blog - WPF, Silverlight, and WinForms Development

Comments are closed
Copyright © 1999-2012 Actipro Software LLC. All rights reserved.
Home Actipro Software | Products | Download | Contact Us