Quantcast
Channel: EVERDYN » CSharp
Viewing all articles
Browse latest Browse all 2

.NET 4.0 now available to ArchestrA System Platform 2012 R2

$
0
0

[link="http://www.everdyn.com/blog/"]From Everdyn's blog[/link]

At the end of 2012, Invensys released a new version of ArchestrA: ArchestrA System Platform 2012 R2. This release supports .NET 4.0 (other .NET Framework versions can coexist, but all scripts in objects run in .NET Framework 4.0). With this framework version, we can take advantage of some new features for our scripts and custom controls/libraries.

 

Among these new functionalities, it introduces the possibility to define optional and named parameters in C#:

blog_20130128(2)

blog_20130128(3)

This is particularly useful for COM objects, by using Microsoft.Office.Interop libraries for instance.

Under 3.5 we had to write:

blog_20130128(4)

We can now clean up our code and provide our two parameters only:

blog_20130128(5)

 

Another new cool feature is the Tuple Class; it allows us to create objects that contain structured data without creating a class object. The object can store from 1 to 7 elements and is in read-only mode.

It is instantiated like a normal class:

blog_20130128(1)

For instance, it can be used as a return object to retrieve several variables of different types:

blog_20130128(6)

 

To learn more, you can find official code samples for C# 4.0 on MSDN.

 

Note: .Net Framework 4.0 includes CLR 4 but the .NET Framework 3.5 includes CLR 2.0 so if you need to use previous versions, don’t uninstall them (see .NET Framework Versions and Dependencies)

 

The post .NET 4.0 now available to ArchestrA System Platform 2012 R2 appeared first on EVERDYN.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images