Skip to content

Instantly share code, notes, and snippets.

@ufcpp
Last active November 10, 2016 07:41
Show Gist options
  • Save ufcpp/73fa3005b75015f6ee13cfdb93cd88e0 to your computer and use it in GitHub Desktop.
Save ufcpp/73fa3005b75015f6ee13cfdb93cd88e0 to your computer and use it in GitHub Desktop.
using System;
class Program
{
static void Main()
{
var á = 1;// U+0061 U+0301
var á = 2; // U+00E1
Console.WriteLine(á == á); // false
var x = nameof(á);
var y = nameof(á);
Console.WriteLine(x == y); // false
Console.WriteLine(string.Equals(x, y, StringComparison.CurrentCulture)); // true
}
}
using System;
class Program
{
static void Main()
{
var が = 1; // U+304B U+3099
var が = 2; // U+304C
Console.WriteLine(が == が); // false
var x = nameof(が);
var y = nameof(が);
Console.WriteLine(x == y); // false
Console.WriteLine(string.Equals(x, y, StringComparison.CurrentCulture)); // true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment