Results 1 to 3 of 3

Thread: Deserialize

  1. #1
    shers is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Aug 2007
    Posts
    86
    Reputation
    121

    Deserialize

    How do I deserialize this?

    public static void SerializeToXML(MainWindow window, Canvas canvas, int dpi, string filename)
    {
    string mystrXAML = XamlWriter.Save(canvas);
    FileStream filestream = File.Create(filename);
    StreamWriter streamwriter = new StreamWriter(filestream);
    streamwriter.Write(mystrXAML);
    streamwriter.Close();
    filestream.Close();
    }

    Thanks

  2. #2
    JohnH's Avatar
    JohnH is online now VB.NET Forum Moderator
    .NET Framework
    .NET 4.5
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    15,085
    Reputation
    2803
    Firstly, this is a VB.Net forum, use VB.Net language code when posting here. Considering you have been a member since 2007 I'd say you should know this. If you have moved to C# language consider using our C# forum instead: C# Developer Forums

    Secondly, I see you create your data using a XamlWriter framework class, have you considered looking up if there exist a XamlReader class that does the opposite? And same with StreamWriter, do you think there is a StreamReader also?
    How to format posts with code blocks etc - present the problem/post properly

    Visual Studio Community 2017

  3. #3
    shers is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Aug 2007
    Posts
    86
    Reputation
    121
    Thanks. It's working.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •