This code will do it:
var el = new XElement(
"Activity",
new XAttribute(XName.Get("Class", "SomeNamespace"), "WorkflowConsoleApplication1.Activity1"),
new XAttribute(
XName.Get("VisualBasic.Settings", "SomeOtherNamespace"),
"Assembly references and imported namespaces for internal implementation"));
Console.WriteLine(el.ToString());
Notice how you do not specify the prefixes, but rather the namespaces that these attributes belong to. This is by design and consistent with the XML spec. Prefixes will be generated automatically, or picked up from the containing element if this element is a child of another element that has already defined a prefix for the namespaces you're using.