Free cookie consent management tool by TermsFeed Policy Generator

source: stable/HeuristicLab.Scripting/3.3/Scripts/Templates/CSharpScriptTemplate.cs @ 18242

Last change on this file since 18242 was 17105, checked in by mkommend, 5 years ago

#2520: Merged 16584, 16585,16594,16595, 16625, 16658, 16659, 16672, 16707, 16729, 16792, 16796, 16797, 16799, 16819, 16906, 16907, 16908, 16933, 16945, 16992, 16994, 16995, 16996, 16997, 17014, 17015, 17017, 17020, 17021, 17022, 17023, 17024, 17029, 17086, 17087, 17088, 17089 into stable.

File size: 851 bytes
RevLine 
[11721]1// use 'vars' to access variables in the script's variable store (e.g. vars.x = 5)
[11937]2// use 'vars[string]' to access variables via runtime strings (e.g. vars["x"] = 5)
[11721]3// use 'vars.Contains(string)' to check if a variable exists
4// use 'vars.Clear()' to remove all variables
5// use 'foreach (KeyValuePair<string, object> v in vars) { ... }' to iterate over all variables
6// use 'variables' to work with IEnumerable<T> extension methods on the script's variable store
7
[17105]8using System;
9using System.Linq;
10using System.Collections.Generic;
[11787]11
[17105]12using HeuristicLab.Core;
13using HeuristicLab.Common;
[11787]14//using HeuristicLab.Collections;
15//using HeuristicLab.Data;
[11721]16
17public class MyScript : HeuristicLab.Scripting.CSharpScriptBase {
18  public override void Main() {
19    // type your code here
20  }
21
22  // implement further classes and methods
23
[11787]24}
Note: See TracBrowser for help on using the repository browser.