Skip to content

Commit 15f90f3

Browse files
committed
Added support for void type
1 parent e8f98f2 commit 15f90f3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Microsoft.Toolkit/Extensions/TypeExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public static class TypeExtensions
3939
[typeof(double)] = "double",
4040
[typeof(decimal)] = "decimal",
4141
[typeof(object)] = "object",
42-
[typeof(string)] = "string"
42+
[typeof(string)] = "string",
43+
[typeof(void)] = "void"
4344
};
4445

4546
/// <summary>

UnitTests/UnitTests.Shared/Extensions/Test_TypeExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public class Test_TypeExtensions
2121
[DataRow("decimal", typeof(decimal))]
2222
[DataRow("object", typeof(object))]
2323
[DataRow("string", typeof(string))]
24+
[DataRow("void", typeof(void))]
2425
public void Test_TypeExtensions_BuiltInTypes(string name, Type type)
2526
{
2627
Assert.AreEqual(name, type.ToTypeString());

0 commit comments

Comments
 (0)