Skip to content

Commit 983b38c

Browse files
Update register-unregister.md
1 parent d129d7c commit 983b38c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/pages/api/register-unregister.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ You can register:
2727
- RegisterType(param Type[])
2828

2929
### Example
30-
```csharp
30+
{% highlight csharp %}
3131
// using Z.Expressions; // Don't forget to include this.
3232
var context = new EvalContext();
3333
context.RegisterAlias("Math2", "System.Math");
@@ -40,19 +40,19 @@ context.RegisterGlobalVariable("sessionCount", 0);
4040
context.RegisterStaticMember(typeof(Math), typeof(Int));
4141
context.RegisterStaticMember(powMemberInfo, RoundMemberInfo);
4242
context.RegisterType(typeof (bool), typeof(char);
43-
```
43+
{% endhighlight %}
4444

4545
### Static Member
4646
You can use static member name without qualifying them with their namespace or type name. Static member is a new feature in C# 6.0.
4747

48-
```csharp
48+
{% highlight csharp %}
4949
// using Z.Expressions; // Don't forget to include this.
5050
var context = new EvalContext();
5151
context.RegisterStaticMember(typeof(Math), typeof(Int));
5252

5353
bool result = context.Execute<double>("Pow(2, 3)"); // Math.Pow(2, 3) = 8"
5454
int result = context.Execute<int>("MinValue"); // Int.MinValue
55-
```
55+
{% endhighlight %}
5656

5757
## Unregister
5858
### Problem
@@ -70,7 +70,7 @@ You can unregister:
7070
- UnregisterType(param Type[])
7171

7272
### Example
73-
```csharp
73+
{% highlight csharp %}
7474
// using Z.Expressions; // Don't forget to include this.
7575
var context = new EvalContext();
7676
context.UnregisterAlias("Math2");
@@ -83,4 +83,4 @@ context.UnregisterGlobalVariables("sessionCount");
8383
context.UnregisterStaticMember(typeof(Math), typeof(Int));
8484
context.UnregisterStaticMember(powMemberInfo, RoundMemberInfo);
8585
context.UnregisterType(typeof (bool), typeof(char);
86-
```
86+
{% endhighlight %}

0 commit comments

Comments
 (0)