The System.Data namespace already contains a class called DataRelation, and this is returned from a DataSet.Relations.Add method call.
The variable you have tried to store it in is declared as a DataRelation - which is the class name your method sits in. There is no conversion defined between the two unrelated types.
Either change the name of your class (but don't change the definition of
) or fully qualify the definition:
Personally, if I was going to use System.Data, I would not call my class a conflicting name, just to avoid confusion!