diff --git a/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorDictionaryFloat/CPP/hashtable_ctordictionaryfloat.cpp b/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorDictionaryFloat/CPP/hashtable_ctordictionaryfloat.cpp index 5d9e06d784d..aeefb15d534 100644 --- a/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorDictionaryFloat/CPP/hashtable_ctordictionaryfloat.cpp +++ b/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorDictionaryFloat/CPP/hashtable_ctordictionaryfloat.cpp @@ -59,16 +59,16 @@ public ref class SamplesHashtable mySL->Add( "THIRD", "!" ); // Create a hash table using the default hash code provider and the default comparer. - Hashtable^ myHT1 = gcnew Hashtable( mySL,(float).8 ); + Hashtable^ myHT1 = gcnew Hashtable( mySL, .8f ); // Create a hash table using the specified case-insensitive hash code provider and case-insensitive comparer. - Hashtable^ myHT2 = gcnew Hashtable( mySL,(float).8,gcnew myCultureComparer() ); + Hashtable^ myHT2 = gcnew Hashtable( mySL, .8f, gcnew myCultureComparer() ); // Create a hash table using the specified KeyComparer. // The KeyComparer uses a case-insensitive hash code provider and a case-insensitive comparer, // which are based on the Turkish culture (tr-TR), where "I" is not the uppercase version of "i". CultureInfo^ myCul = gcnew CultureInfo( "tr-TR" ); - Hashtable^ myHT3 = gcnew Hashtable( mySL,(float).8, gcnew myCultureComparer( myCul ) ); + Hashtable^ myHT3 = gcnew Hashtable( mySL, .8f, gcnew myCultureComparer( myCul ) ); // Search for a key in each hash table. Console::WriteLine( "first is in myHT1: {0}", myHT1->ContainsKey( "first" ) ); diff --git a/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorIntFloat/CPP/hashtable_ctorintfloat.cpp b/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorIntFloat/CPP/hashtable_ctorintfloat.cpp index 7b893a3c2b7..a55776fd358 100644 --- a/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorIntFloat/CPP/hashtable_ctorintfloat.cpp +++ b/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorIntFloat/CPP/hashtable_ctorintfloat.cpp @@ -52,14 +52,14 @@ public ref class SamplesHashtable static void Main() { // Create a hash table using the default comparer. - Hashtable^ myHT1 = gcnew Hashtable(3, (float).8); + Hashtable^ myHT1 = gcnew Hashtable(3, .8f); myHT1->Add("FIRST", "Hello"); myHT1->Add("SECOND", "World"); myHT1->Add("THIRD", "!"); // Create a hash table using the specified IEqualityComparer that uses // the CaseInsensitiveComparer.DefaultInvariant to determine equality. - Hashtable^ myHT2 = gcnew Hashtable(3, (float).8, gcnew myCultureComparer()); + Hashtable^ myHT2 = gcnew Hashtable(3, .8f, gcnew myCultureComparer()); myHT2->Add("FIRST", "Hello"); myHT2->Add("SECOND", "World"); myHT2->Add("THIRD", "!"); @@ -68,7 +68,7 @@ public ref class SamplesHashtable // the Turkish culture (tr-TR) where "I" is not the uppercase // version of "i". CultureInfo^ myCul = gcnew CultureInfo("tr-TR"); - Hashtable^ myHT3 = gcnew Hashtable(3, (float).8, gcnew myCultureComparer(myCul)); + Hashtable^ myHT3 = gcnew Hashtable(3, .8f, gcnew myCultureComparer(myCul)); myHT3->Add("FIRST", "Hello"); myHT3->Add("SECOND", "World"); myHT3->Add("THIRD", "!"); diff --git a/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorDictionaryFloat/CS/hashtable_ctordictionaryfloat.cs b/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorDictionaryFloat/CS/hashtable_ctordictionaryfloat.cs index 3d9de1d8ef6..88930dc8514 100644 --- a/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorDictionaryFloat/CS/hashtable_ctordictionaryfloat.cs +++ b/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorDictionaryFloat/CS/hashtable_ctordictionaryfloat.cs @@ -53,19 +53,18 @@ public static void Main() mySL.Add("THIRD", "!"); // Create a hash table using the default comparer. - Hashtable myHT1 = new Hashtable(mySL, (float).8); + Hashtable myHT1 = new Hashtable(mySL, .8f); // Create a hash table using the specified IEqualityComparer that uses // the CaseInsensitiveComparer.DefaultInvariant to determine equality. - Hashtable myHT2 = new Hashtable(mySL, (float).8, + Hashtable myHT2 = new Hashtable(mySL, .8f, new myCultureComparer()); // Create a hash table using an IEqualityComparer that is based on // the Turkish culture (tr-TR) where "I" is not the uppercase // version of "i". CultureInfo myCul = new CultureInfo("tr-TR"); - Hashtable myHT3 = new Hashtable(mySL, (float).8, - new myCultureComparer(myCul)); + Hashtable myHT3 = new Hashtable(mySL, .8f, new myCultureComparer(myCul)); // Search for a key in each hash table. Console.WriteLine("first is in myHT1: {0}", myHT1.ContainsKey("first")); diff --git a/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorIntFloat/CS/hashtable_ctorintfloat.cs b/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorIntFloat/CS/hashtable_ctorintfloat.cs index 5069a9301b7..4b6e999e5cd 100644 --- a/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorIntFloat/CS/hashtable_ctorintfloat.cs +++ b/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Hashtable_ctorIntFloat/CS/hashtable_ctorintfloat.cs @@ -47,14 +47,14 @@ public static void Main() { // Create a hash table using the default comparer. - Hashtable myHT1 = new Hashtable(3, (float).8); + Hashtable myHT1 = new Hashtable(3, .8f); myHT1.Add("FIRST", "Hello"); myHT1.Add("SECOND", "World"); myHT1.Add("THIRD", "!"); // Create a hash table using the specified IEqualityComparer that uses // the CaseInsensitiveComparer.DefaultInvariant to determine equality. - Hashtable myHT2 = new Hashtable(3, (float).8, new myCultureComparer()); + Hashtable myHT2 = new Hashtable(3, .8f, new myCultureComparer()); myHT2.Add("FIRST", "Hello"); myHT2.Add("SECOND", "World"); myHT2.Add("THIRD", "!"); @@ -63,8 +63,7 @@ public static void Main() // the Turkish culture (tr-TR) where "I" is not the uppercase // version of "i". CultureInfo myCul = new CultureInfo("tr-TR"); - Hashtable myHT3 = new Hashtable(3, (float).8, - new myCultureComparer(myCul)); + Hashtable myHT3 = new Hashtable(3, .8f, new myCultureComparer(myCul)); myHT3.Add("FIRST", "Hello"); myHT3.Add("SECOND", "World"); diff --git a/snippets/csharp/VS_Snippets_Misc/astoria northwind service/cs/northwind2.svc.cs b/snippets/csharp/VS_Snippets_Misc/astoria northwind service/cs/northwind2.svc.cs index 3e97d33abef..f6cded5cc4b 100644 --- a/snippets/csharp/VS_Snippets_Misc/astoria northwind service/cs/northwind2.svc.cs +++ b/snippets/csharp/VS_Snippets_Misc/astoria northwind service/cs/northwind2.svc.cs @@ -71,7 +71,7 @@ void ProcessingPipeline_ProcessingChangeset(object sender, EventArgs e) // Order_Detail item = (Order_Detail)entity; - // item.Discount = (float)0.5; + // item.Discount = 0.5f; // this.CurrentDataSource.SaveChanges(); diff --git a/snippets/csharp/VS_Snippets_VBCSharp/VbPowerPacksShapeScale/CS/ShapeScale.cs b/snippets/csharp/VS_Snippets_VBCSharp/VbPowerPacksShapeScale/CS/ShapeScale.cs index 422b2903ac1..f4941cc04a4 100644 --- a/snippets/csharp/VS_Snippets_VBCSharp/VbPowerPacksShapeScale/CS/ShapeScale.cs +++ b/snippets/csharp/VS_Snippets_VBCSharp/VbPowerPacksShapeScale/CS/ShapeScale.cs @@ -27,7 +27,7 @@ private void ovalShape1_Click(System.Object sender, System.EventArgs e) } else { - ovalShape1.Scale(new SizeF((float)0.5, ((float)0.333))); + ovalShape1.Scale(new SizeF(0.5f, 0.333f)); state = false; } } diff --git a/snippets/csharp/VS_Snippets_Winforms/TabControl.RightAlignedTabs/CS/Form1.cs b/snippets/csharp/VS_Snippets_Winforms/TabControl.RightAlignedTabs/CS/Form1.cs index d44453729ad..140ab564286 100644 --- a/snippets/csharp/VS_Snippets_Winforms/TabControl.RightAlignedTabs/CS/Form1.cs +++ b/snippets/csharp/VS_Snippets_Winforms/TabControl.RightAlignedTabs/CS/Form1.cs @@ -44,7 +44,7 @@ private void tabControl1_DrawItem(Object sender, System.Windows.Forms.DrawItemEv } // Use our own font. - Font _tabFont = new Font("Arial", (float)10.0, FontStyle.Bold, GraphicsUnit.Pixel); + Font _tabFont = new Font("Arial", 10.0f, FontStyle.Bold, GraphicsUnit.Pixel); // Draw string. Center the text. StringFormat _stringFlags = new StringFormat();