Click here to Skip to main content
15,878,852 members
Home / Discussions / C#
   

C#

 
GeneralRe: easy ToolBar q. Pin
Chris Richner28-Jan-03 3:08
Chris Richner28-Jan-03 3:08 
QuestionOfficeApp (Word, Excel, Outlook) as MdiChild in my MdiForm ? Pin
Chris Richner27-Jan-03 22:38
Chris Richner27-Jan-03 22:38 
GeneralSave a drawing on the disk Pin
moshu27-Jan-03 22:31
moshu27-Jan-03 22:31 
GeneralRe: Save a drawing on the disk Pin
Heath Stewart28-Jan-03 3:56
protectorHeath Stewart28-Jan-03 3:56 
GeneralOpen MSProject2000 inside a windows form Pin
Member 20085527-Jan-03 17:06
Member 20085527-Jan-03 17:06 
GeneralCall DLL From C#app OK. But SOAP no. Pin
Dato27-Jan-03 15:14
Dato27-Jan-03 15:14 
GeneralBest Way to Move very Large Float[,] across TCP/IP Pin
Deane27-Jan-03 14:04
Deane27-Jan-03 14:04 
GeneralRe: Best Way to Move very Large Float[,] across TCP/IP Pin
Nathan Blomquist27-Jan-03 17:51
Nathan Blomquist27-Jan-03 17:51 
These static functions will allow you to create byte[]s from the float[,]s and then convert them back.
<br />
using System;<br />
using System.Runtime.Serialization.Formatters.Binary;<br />
using System.IO;<br />
<br />
public class Utility<br />
	{<br />
		public static byte[] TwoDFloatArrayToByteArray(float[,] floats)<br />
		{<br />
			// a place to put the float array after it has been made into a byte[]<br />
			MemoryStream mem = new MemoryStream();<br />
<br />
			// the object to actually make the byte[]<br />
			BinaryFormatter bf = new BinaryFormatter();<br />
<br />
			// do the work<br />
			bf.Serialize(mem,floats);<br />
<br />
			// return the bytes<br />
			return mem.ToArray();<br />
		}<br />
<br />
<br />
		// just reverse the process<br />
		public static float[,] ByteArrayToTwoDFloatArray(byte[] bytes)<br />
		{<br />
			MemoryStream mem = new MemoryStream(bytes);<br />
<br />
			BinaryFormatter bf = new BinaryFormatter();<br />
<br />
			float[,] floats = (float[,])bf.Deserialize(mem);<br />
<br />
			return floats;<br />
		}<br />
	}

I can't really help you with the TCP/IP problem. All I can say is "Compress those byte[]s before transmission!". 30 million floats is 120mb... Hope you have a fast connection.

---------------------------
Hmmm... what's a signature?
GeneralRe: Best Way to Move very Large Float[,] across TCP/IP Pin
Deane27-Jan-03 18:12
Deane27-Jan-03 18:12 
GeneralRe: Best Way to Move very Large Float[,] across TCP/IP Pin
Nathan Blomquist28-Jan-03 14:57
Nathan Blomquist28-Jan-03 14:57 
Generalcopy paste problems with MDI Pin
Gerosa27-Jan-03 6:45
Gerosa27-Jan-03 6:45 
General1 FCL question and 1 general question Pin
Q&A27-Jan-03 6:28
Q&A27-Jan-03 6:28 
GeneralRe: 1 FCL question and 1 general question Pin
Richard Deeming27-Jan-03 7:02
mveRichard Deeming27-Jan-03 7:02 
GeneralFile Actions Pin
Waleed Zedan27-Jan-03 4:26
Waleed Zedan27-Jan-03 4:26 
GeneralRe: File Actions Pin
jtmtv1827-Jan-03 13:05
jtmtv1827-Jan-03 13:05 
GeneralSetting mouse position using C# Pin
ahpex27-Jan-03 4:15
ahpex27-Jan-03 4:15 
GeneralRe: Setting mouse position using C# Pin
Philip Fitzsimons27-Jan-03 6:12
Philip Fitzsimons27-Jan-03 6:12 
GeneralCalling DLL File In C# Pin
mo7amed27-Jan-03 4:13
mo7amed27-Jan-03 4:13 
GeneralRe: Calling DLL File In C# Pin
Nick Parker27-Jan-03 5:27
protectorNick Parker27-Jan-03 5:27 
GeneralRe: Calling DLL File In C# Pin
Dato27-Jan-03 8:23
Dato27-Jan-03 8:23 
QuestionCalling COM DLL From C#? Bad idea ? Pin
Dato27-Jan-03 4:07
Dato27-Jan-03 4:07 
AnswerRe: Calling COM DLL From C#? Bad idea ? Pin
Nick Parker27-Jan-03 5:30
protectorNick Parker27-Jan-03 5:30 
GeneralCrippled WNDPROC Pin
Roger Alsing27-Jan-03 3:54
Roger Alsing27-Jan-03 3:54 
GeneralRe: Crippled WNDPROC Pin
Jeff J27-Jan-03 11:59
Jeff J27-Jan-03 11:59 
GeneralVB.Net code to C#.Net code Pin
Firas Rashid27-Jan-03 3:38
Firas Rashid27-Jan-03 3: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.