Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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" ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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", "!");
Expand All @@ -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", "!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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", "!");
Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down