Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

Piyush Wattamwar

@Piyush Wattamwar
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • XML Serialize Hashtable..
    P Piyush Wattamwar

    i have tried it but it is not possible using hashtable. till i send you code which i have tried. using System; using System.Collections.Generic; using System.Text; using System.Runtime.Serialization; using System.Xml.Serialization; using System.IO; using System.Runtime.Serialization.Formatters.Binary; using System.Collections; namespace HAshxml { [Serializable] public class test { public int height; public int length; public test() { Console.WriteLine("Inside test parameter less constructor"); } public test(int x,int y) { height = x; length = y; Console.WriteLine("Inside test constructor"); } public void GetObjectData(SerializationInfo info,StreamingContext context) { Console.WriteLine("Inside Get object data"); } } public class Program { static void Main(string[] args) { test t = new test(10,20); Hashtable ht = new Hashtable(); ht.Add("h", t); Stream str = File.OpenWrite("D:\\abc.xml"); //BinaryFormatter formatter = new BinaryFormatter(); XmlSerializer ser = new XmlSerializer(typeof(test)); ser.Serialize(str, ht); str.Close(); //formatter.Serialize(str, ht); //str.Close(); //XmlTextWriter xl=new XmlTextWriter ( Console.ReadLine(); } } }

    C# xml help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups