Skip to content

Commit 7fa0d98

Browse files
Merge pull request #217 from MendyBerger/patch-2
C# example - don't confuse int/s32 with uint/u32
2 parents bdaab9b + 3025edf commit 7fa0d98

File tree

1 file changed

+3
-3
lines changed
  • component-model/src/language-support

1 file changed

+3
-3
lines changed

component-model/src/language-support/csharp.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ with an `add` function:
7272
package example:component;
7373
7474
world example {
75-
export add: func(x: s32, y: s32) -> s32;
75+
export add: func(x: u32, y: u32) -> u32;
7676
}
7777
```
7878

@@ -94,7 +94,7 @@ namespace ExampleWorld;
9494

9595
public class ExampleWorldImpl : IOperations
9696
{
97-
public static int Add(int x, int y)
97+
public static uint Add(uint x, uint y)
9898
{
9999
return x + y;
100100
}
@@ -144,7 +144,7 @@ namespace ExampleWorld.wit.exports.example.component;
144144

145145
public class AddImpl : IAdd
146146
{
147-
public static int Add(int x, int y)
147+
public static uint Add(uint x, uint y)
148148
{
149149
return x + y;
150150
}

0 commit comments

Comments
 (0)