Skip to content

Commit 6e0f5cf

Browse files
committed
Added optional parameter example.
1 parent 6fce05f commit 6e0f5cf

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/guides-basic/dotnet-native-aot-support.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,21 @@ public static string NativeNullableDouble(double? d)
282282
| A1 | =NativeNullableDouble(1.2) | Native Nullable VAL: 1.2
283283
| A2 | =NativeNullableDouble() | Native Nullable VAL: NULL
284284

285+
## Optional parameter
286+
287+
```csharp
288+
[ExcelFunction]
289+
public static string NativeOptionalDouble(double d = 1.23)
290+
{
291+
return "Native Optional VAL: " + d.ToString();
292+
}
293+
```
294+
295+
| Cell | Formula | Result
296+
| ----- | -------------------------- | ------
297+
| A1 | =NativeOptionalDouble(2.3) | Native Optional VAL: 2.3
298+
| A2 | =NativeOptionalDouble() | Native Optional VAL: 1.23
299+
285300
# Not supported functionality in native add-ins
286301

287302
Loading images for ribbon controls.

0 commit comments

Comments
 (0)