It's a dialect (superset) of ECMAScript based on the never-released 4th edition draft, which was in development at the time C# was first released, so these similarities are no accident.