Click here to Skip to main content
15,894,896 members
Home / Discussions / C#
   

C#

 
AnswerRe: is there any binary to decimal convertor class Pin
DaveyM6926-Dec-09 16:09
professionalDaveyM6926-Dec-09 16:09 
GeneralRe: is there any binary to decimal convertor class Pin
hotthoughtguy26-Dec-09 22:43
hotthoughtguy26-Dec-09 22:43 
Questioncustom shaped windows forms in c# problem Pin
hosseinghazanfary22-Dec-09 7:35
hosseinghazanfary22-Dec-09 7:35 
AnswerRe: custom shaped windows forms in c# problem Pin
Md. Marufuzzaman22-Dec-09 9:26
professionalMd. Marufuzzaman22-Dec-09 9:26 
QuestionStoring 2 bytes in one Pin
Chris Copeland22-Dec-09 5:57
mveChris Copeland22-Dec-09 5:57 
Answercrap Pin
Luc Pattyn22-Dec-09 6:21
sitebuilderLuc Pattyn22-Dec-09 6:21 
GeneralRe: crap Pin
Chris Copeland22-Dec-09 6:25
mveChris Copeland22-Dec-09 6:25 
GeneralRe: crap Pin
Luc Pattyn22-Dec-09 7:58
sitebuilderLuc Pattyn22-Dec-09 7:58 
when I said "storing 2 byte values in 3 bytes is plain stupid." I can assure you it is, as that isn't compression at all, if anything it is expansion.

Epoque wrote:
i'm not entirely experienced with the whole "storing two values in one"


Nobody is, as it can't be done. If you could store two byte values in one byte (i.e. store two byte values and then retrieve those values in any order and as often as you'd like), then what would keep you from doing that recursively: you could store the first two bytes of anything in 1, the next two bytes in another one, then combine those two bytes into a final byte; in the end you could store any amount of data, why not the entire Internet, into that one final byte?

We do get lunatics asking such questions regularly.


OTOH one of the replies you posted earlier in this thread seems to indicate an entirely different problem: storing one (or N) values for a 2D collection of cells. That can easily be solved in many ways:

1. with N two-dimensional arrays
2. with N one-dimensional arrays, and linearizing the index (as in index = x + y * width)
3. with a single one-dimensional array holding a little struct, which holds the different values for a single cell.

If that is what you need, then you should have made that clear from the start.

Smile | :)

Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


AnswerRe: Storing 2 bytes in one Pin
harold aptroot22-Dec-09 6:29
harold aptroot22-Dec-09 6:29 
GeneralRe: Storing 2 bytes in one Pin
Chris Copeland22-Dec-09 6:51
mveChris Copeland22-Dec-09 6:51 
GeneralRe: Storing 2 bytes in one Pin
harold aptroot22-Dec-09 6:55
harold aptroot22-Dec-09 6:55 
AnswerRe: Storing 2 bytes in one Pin
J4amieC22-Dec-09 6:35
J4amieC22-Dec-09 6:35 
GeneralRe: Storing 2 bytes in one Pin
Chris Copeland22-Dec-09 6:49
mveChris Copeland22-Dec-09 6:49 
GeneralRe: Storing 2 bytes in one Pin
harold aptroot22-Dec-09 6:52
harold aptroot22-Dec-09 6:52 
GeneralRe: Storing 2 bytes in one Pin
Chris Copeland22-Dec-09 6:57
mveChris Copeland22-Dec-09 6:57 
GeneralRe: Storing 2 bytes in one Pin
harold aptroot22-Dec-09 7:09
harold aptroot22-Dec-09 7:09 
GeneralRe: Storing 2 bytes in one Pin
Chris Copeland22-Dec-09 7:18
mveChris Copeland22-Dec-09 7:18 
GeneralRe: Storing 2 bytes in one Pin
harold aptroot22-Dec-09 7:21
harold aptroot22-Dec-09 7:21 
GeneralRe: Storing 2 bytes in one Pin
Chris Copeland22-Dec-09 7:29
mveChris Copeland22-Dec-09 7:29 
GeneralRe: Storing 2 bytes in one Pin
harold aptroot22-Dec-09 7:48
harold aptroot22-Dec-09 7:48 
GeneralRe: Storing 2 bytes in one Pin
Ben Fair22-Dec-09 11:06
Ben Fair22-Dec-09 11:06 
GeneralRe: Storing 2 bytes in one Pin
harold aptroot22-Dec-09 11:14
harold aptroot22-Dec-09 11:14 
GeneralRe: Storing 2 bytes in one Pin
J4amieC22-Dec-09 21:30
J4amieC22-Dec-09 21:30 
GeneralRe: Storing 2 bytes in one Pin
harold aptroot22-Dec-09 21:44
harold aptroot22-Dec-09 21:44 
AnswerRe: Storing 2 bytes in one Pin
PIEBALDconsult22-Dec-09 10:28
mvePIEBALDconsult22-Dec-09 10:28 

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.