You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Overview

On creating displays for web deployments (Portable or HTML5 displays),  CodeBehind and expressions on the graphical elements, are compiled to .NET 8. 

This brings some incompatibilities with code created only for WPF, which are presented in this section. 

On this page:


Comparing Strings

The Net.8 compiler for VB.NET CodeBehind and embedded expressions won't accept the simplified syntax: if ( Tag.test = "ABC", .....

When you need to compare string the script.Compare() method should be used.

Displays Expressions Examples
If (string.Compare( tag.Test, "abc") == 0, "equal", "not equal")
If (string.Compare( tag.Test, "abc", true) == 0, "equal", "not equal")
If (string.Compare( tag.Test, "abc", StringComparison.OrdinalIgnoreCase) == 0, "equal", "not equal")
VB.Net CodeBehind Example
Dim s as string
If (string.Compare( @tag.Test, "abc", true) == 0) Then
   s = "equal"
Else
  s = "not equal"
Endif

C# Code Behind

If the CodeBehind is in C# (CSharp) the syntax with the direct is still accepted:  Test = "abc" 


Methods Not Available

CINT 

RND

ServiceController

Replace by calls to TK or other .NET methods


.Net and C# Version

In our development framework, users can create two types of solutions: Windows Only and MultiPlatform. The distinction between them directly affects the version of the .NET runtime and the C# language features available during script compilation and UI generation.

For Windows Only solutions, scripts are compiled using .NET Framework 4.8. In this environment, the C# version is limited to 7.3, with partial support for C# 8.0 features. However, some modern C# capabilities—such as the range operator (..), switch expressions, record types, and default interface methods—are either not available or partially supported in this scenario.

On the other hand, MultiPlatform solutions use .NET 8, which includes full support for the latest C# 12 language features. This allows users to take full advantage of modern syntax and constructs across both scripts and UI code.

Regardless of solution type, HTML5 screens are always generated using .NET 8. This means that even in Windows Only solutions, any C# code used for HTML5 UI generation will be compiled using C# 12. As a result, it's possible for the same solution to have scripts limited to C# 7.3 while HTML5 components use advanced C# 12 features.

In addition to HTML5 interfaces, the framework also supports RichClient and SmartClient UIs based on WPF technology. These interfaces always rely on .NET Framework 4.8 and will only run on Windows systems, even in MultiPlatform solutions where the server itself may run on Linux or another environment. This means WPF-based UIs inherit the same C# limitations as the Windows Only runtime, regardless of the server platform.

This dual-runtime approach offers flexibility but requires attention to language compatibility. Developers must be cautious when writing shared logic between script and UI layers to avoid using language features that are unsupported in the script runtime of Windows Only solutions.


In this section...

The root page V10:@parent could not be found in space v10.

  • No labels