Skip to content

Commit

Permalink
Removed unreachable code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoey Goetzinger committed Aug 21, 2019
1 parent c3b841e commit 802ee47
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions XmlSchemaClassGenerator/TypeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1284,9 +1284,6 @@ public override CodeExpression GetDefaultValueFor(string defaultString, bool att
else if(type == typeof(byte[]) && !string.IsNullOrWhiteSpace(defaultString))
{
int numberChars = defaultString.Length;
if(numberChars % 2 == 1)
throw new NotSupportedException(string.Format("Default value {0} is not a valid hexBinary value.", defaultString));

var byteValues = new CodePrimitiveExpression[numberChars / 2];
for (int i = 0; i < numberChars; i += 2)
byteValues[i / 2] = new CodePrimitiveExpression(Convert.ToByte(defaultString.Substring(i, 2), 16));
Expand Down

0 comments on commit 802ee47

Please sign in to comment.