Table of Contents

Property Platform

Namespace
Alternet.Scripter
Assembly
Alternet.Scripter.v9.dll

Platform

Gets or sets target platform (32 or 64 bits).

public virtual ScriptPlatform Platform { get; set; }

Property Value

ScriptPlatform

Examples

Here is how to use a Platform in the C# code:

using System.Linq;
using System.Windows.Forms;

using Alternet.Scripter;

public partial class Form1 : Form
{
    private ScriptRun scriptRun;
    private void Form1_Load(object sender, EventArgs e)
    {
        scriptRun = new ScriptRun() { ScriptLanguage = ScriptLanguage.CSharp, Platform = ScriptPlatform.Auto, ScriptMode = ScriptMode.Debug };
    }
}

Here is how to use a Platform in the Visual Basic code:

Imports System.Linq
Imports System.Windows.Forms
Imports Alternet.Scripter

Partial Public Class Form1
    Inherits Form

    Private scriptRun As ScriptRun

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
        scriptRun = New ScriptRun() With {
            .ScriptLanguage = ScriptLanguage.CSharp,
            .Platform = ScriptPlatform.Auto,
            .ScriptMode = ScriptMode.Debug
        }
    End Sub
End Class

Remarks

By default Platform is AnyCpu. Change this property only if you need the script to be explicitly compiled for the x86 or x64 assembly platforms.