Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit 581726d

Browse files
authored
Merge pull request #855 from Tape-Worm/Github_Issue_787
Updated variant.cs for issue #787
2 parents 8b94b50 + eac980a commit 581726d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Source/SharpDX/Win32/Variant.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,20 @@ public unsafe object Value
275275
Type = VariantType.Default;
276276
if (type.GetTypeInfo().IsPrimitive)
277277
{
278+
if (type == typeof(byte))
279+
{
280+
ElementType = VariantElementType.UByte;
281+
variantValue.byteValue = (byte)value;
282+
return;
283+
}
284+
285+
if (type == typeof(sbyte))
286+
{
287+
ElementType = VariantElementType.Byte;
288+
variantValue.signedByteValue = (sbyte)value;
289+
return;
290+
}
291+
278292
if (type == typeof(int))
279293
{
280294
ElementType = VariantElementType.Int;

0 commit comments

Comments
 (0)