Click here to Skip to main content
15,914,419 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to read a binary file created in pure c++ Pin
paulcortez27-Jun-06 21:59
paulcortez27-Jun-06 21:59 
GeneralRe: How to read a binary file created in pure c++ Pin
stancrm28-Jun-06 1:22
stancrm28-Jun-06 1:22 
GeneralRe: How to read a binary file created in pure c++ Pin
paulcortez28-Jun-06 1:44
paulcortez28-Jun-06 1:44 
GeneralRe: How to read a binary file created in pure c++ Pin
stancrm28-Jun-06 1:51
stancrm28-Jun-06 1:51 
GeneralRe: How to read a binary file created in pure c++ [modified] Pin
paulcortez28-Jun-06 2:04
paulcortez28-Jun-06 2:04 
GeneralRe: How to read a binary file created in pure c++ [modified] Pin
stancrm28-Jun-06 2:24
stancrm28-Jun-06 2:24 
GeneralRe: How to read a binary file created in pure c++ Pin
Nigor28-Jun-06 2:21
Nigor28-Jun-06 2:21 
GeneralRe: How to read a binary file created in pure c++ Pin
stancrm28-Jun-06 2:33
stancrm28-Jun-06 2:33 
Try to play with this code and see the file test.bin.
using System;
using System.Text;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;

namespace ConsoleApplication22
{
	class Class1
	{
		[STAThread]
		static void Main(string[] args)
		{
			Test t;
			t.firstname = "Hello".ToCharArray();
			t.lastname = "World".ToCharArray();

			// Serialize
			using(FileStream fs = new FileStream("test.bin", FileMode.Create))
			{
				BinaryFormatter b = new BinaryFormatter();
				b.Serialize(fs, t);
			}

			// Deserialize
			using(FileStream fs = new FileStream("test.bin", FileMode.Open))
			{
				BinaryFormatter b = new BinaryFormatter();
				Test newt = (Test)b.Deserialize(fs);
			}
		}
	}

	[Serializable]
	struct Test
	{
		public char[] firstname;
		public char[] lastname;
	}
}

GeneralRe: How to read a binary file created in pure c++ Pin
Nigor28-Jun-06 4:01
Nigor28-Jun-06 4:01 
GeneralRe: How to read a binary file created in pure c++ Pin
stancrm28-Jun-06 19:57
stancrm28-Jun-06 19:57 
QuestionProblem using Acrobat COM Pin
Awase Ahmed27-Jun-06 17:34
Awase Ahmed27-Jun-06 17:34 
Questionhow to streaming audio/video ? Pin
hdv21227-Jun-06 14:44
hdv21227-Jun-06 14:44 
AnswerRe: how to streaming audio/video ? [modified] Pin
Mike Poz27-Jun-06 15:03
Mike Poz27-Jun-06 15:03 
AnswerRe: how to streaming audio ? Pin
Divyang Mithaiwala27-Jun-06 18:31
Divyang Mithaiwala27-Jun-06 18:31 
QuestionMaking remoting work between multiple versions of the same assembly [modified] Pin
Luis Alonso Ramos27-Jun-06 14:34
Luis Alonso Ramos27-Jun-06 14:34 
Questioncreating dynamic classes Pin
Manu_8127-Jun-06 13:36
Manu_8127-Jun-06 13:36 
AnswerRe: creating dynamic classes Pin
Guffa27-Jun-06 13:47
Guffa27-Jun-06 13:47 
GeneralRe: creating dynamic classes Pin
Manu_8127-Jun-06 14:23
Manu_8127-Jun-06 14:23 
GeneralRe: creating dynamic classes Pin
Guffa27-Jun-06 18:56
Guffa27-Jun-06 18:56 
GeneralRe: creating dynamic classes Pin
Karl 200027-Jun-06 20:26
Karl 200027-Jun-06 20:26 
GeneralRe: creating dynamic classes Pin
J4amieC27-Jun-06 21:57
J4amieC27-Jun-06 21:57 
AnswerRe: creating dynamic classes Pin
J4amieC27-Jun-06 21:58
J4amieC27-Jun-06 21:58 
AnswerRe: creating dynamic classes Pin
Rob Philpott27-Jun-06 23:15
Rob Philpott27-Jun-06 23:15 
QuestionSerial Communication (Loopback) Pin
Cadence2.027-Jun-06 12:48
Cadence2.027-Jun-06 12:48 
AnswerRe: Serial Communication (Loopback) Pin
led mike27-Jun-06 20:38
led mike27-Jun-06 20:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.