From 32dab1d3c7641688e9435be22297e092bcdb5ee6 Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Fri, 30 Dec 2016 17:58:48 +0100 Subject: [XamlC] detect duplicate x:Name at compile time (#655) * [XamlC] detect duplicate x:Name at compile time * invoking methods with the right arguments produces better results --- Xamarin.Forms.Xaml/RegisterXNamesVisitor.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Xamarin.Forms.Xaml') diff --git a/Xamarin.Forms.Xaml/RegisterXNamesVisitor.cs b/Xamarin.Forms.Xaml/RegisterXNamesVisitor.cs index 7985cff1..a7da3b98 100644 --- a/Xamarin.Forms.Xaml/RegisterXNamesVisitor.cs +++ b/Xamarin.Forms.Xaml/RegisterXNamesVisitor.cs @@ -39,8 +39,7 @@ namespace Xamarin.Forms.Xaml { if (ae.ParamName != "name") throw ae; - throw new XamlParseException( - string.Format("An element with the name \"{0}\" already exists in this NameScope", (string)node.Value), node); + throw new XamlParseException($"An element with the name \"{(string)node.Value}\" already exists in this NameScope", node); } } -- cgit v1.2.3