TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajesh Kumar
NA
39
12.6k
Clone the Generic type
Apr 30 2013 4:58 AM
Hi,
i am facing Cannot serialize a generic type 'Microsoft.Practices.Prism.Commands.DelegateCommand`1[System.Object]'.
when Cloning.i am using the below method for cloning.
public static T TrycloneElement<T>(T orig)
{
try
{
string s = XamlWriter.Save(orig);
StringReader stringReader = new StringReader(s);
XmlReader xmlReader = XmlTextReader.Create(stringReader, new XmlReaderSettings());
XmlReaderSettings sx = new XmlReaderSettings();
object x = XamlReader.Load(xmlReader);
return (T)x;
}
catch
{
return (T)((object)null);
}
}
please give me the solution
Thanks
Rajesh.
Reply
Answers (
1
)
Stop selecting usercontrol in wpf
Add generated resource file into solution at runtime