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
  1. Home
  2. General Programming
  3. C#
  4. How to access Serialised object of an application ?

How to access Serialised object of an application ?

Scheduled Pinned Locked Moved C#
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mr Perfect
    wrote on last edited by
    #1

    Dear All, I am using the below code to serialise my class object. i want to access this serialised object into another application . Please let me know how to go about it. [Serializable] class Sample { public int i = 0; public int j = 0; public string str = ""; static void Main(string[] args) { Sample objSample = new Sample(); objSample.i = 1222; objSample.j = 5555; objSample.str = "This is serialised data"; IFormatter formatter = new BinaryFormatter(); Stream fs = new FileStream("MyFile.bin", FileMode.Create, FileAccess.ReadWrite, FileShare.None); formatter.Serialize(fs, objSample); fs.Close(); Console.WriteLine("Class serialised"); }

    J 1 Reply Last reply
    0
    • M Mr Perfect

      Dear All, I am using the below code to serialise my class object. i want to access this serialised object into another application . Please let me know how to go about it. [Serializable] class Sample { public int i = 0; public int j = 0; public string str = ""; static void Main(string[] args) { Sample objSample = new Sample(); objSample.i = 1222; objSample.j = 5555; objSample.str = "This is serialised data"; IFormatter formatter = new BinaryFormatter(); Stream fs = new FileStream("MyFile.bin", FileMode.Create, FileAccess.ReadWrite, FileShare.None); formatter.Serialize(fs, objSample); fs.Close(); Console.WriteLine("Class serialised"); }

      J Offline
      J Offline
      jdkulkarni
      wrote on last edited by
      #2

      Use remoting or MSMQ.

      Jayant D. Kulkarni Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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