In the beginning Microsoft created its own Java compiler and called it J++. Then there was a lawsuit by Sun that went on for a while.
Microsoft decided to cancel J++ and instead, shortly afterwards C# 1.0 was released and the language was extremly similar.
I was using early C# 1.0 Betas and it was even more obvious.
Later editions and certainly C# 2.0 which introduced generics took a different path than Java and today they are different.