From 2bbb7aa2b78a246b44fb0c5b7a012796aad2e635 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Wed, 9 Aug 2017 15:47:44 -0400 Subject: [PATCH] Validation --- ICD.Common.Utils/Extensions/StringExtensions.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ICD.Common.Utils/Extensions/StringExtensions.cs b/ICD.Common.Utils/Extensions/StringExtensions.cs index 3e76958..aa0093f 100644 --- a/ICD.Common.Utils/Extensions/StringExtensions.cs +++ b/ICD.Common.Utils/Extensions/StringExtensions.cs @@ -85,6 +85,9 @@ namespace ICD.Common.Utils.Extensions if (extends == null) throw new ArgumentNullException("extends"); + if (count < 1) + throw new ArgumentException("Value must be greater or equal to 1", "count"); + if (count < 2) { yield return extends;