Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

SERIOUS C# QUESTION

Name: Anonymous 2011-05-31 11:36

HOW DO I save the representation of a class in binary file. i mena like the class is represented in memory at runtime and then how i read it into class

?

Name: Anonymous 2011-05-31 11:37

bump

Name: Anonymous 2011-05-31 11:39

ne1 plox????

Name: Anonymous 2011-05-31 11:39

Read SICP.

Name: Anonymous 2011-05-31 11:41

write(fd, &class, sizeof class);

Name: Anonymous 2011-05-31 12:14

what the fuck am I reading?

Name: Anonymous 2011-05-31 12:14

>>5
no pointers faggot

Name: Anonymous 2011-05-31 12:27

Does .net suppprt serialization?

Name: Anonymous 2011-05-31 12:31

>>8

the expert wants to write the class to disk, not an object

Name: Anonymous 2011-05-31 12:42

>>9
OP is retarded. He needs serialization.

Name: Anonymous 2011-05-31 12:43

>>9
lol what and check my dubs

Name: Anonymous 2011-05-31 12:44

Won't a class have a pointer to somewhere in it? So it would be invalid on a separate invocation that loads the data from the file.

Name: Anonymous 2011-05-31 12:54

>>12
Do objects in C# have values? Or is the language retarded like java in the fact that objects don't have values.

Name: Anonymous 2011-05-31 12:58

*in the fact that objects aren't values.*

Name: Anonymous 2011-05-31 13:02

>>1
Classes are not structs.

Name: Anonymous 2011-05-31 14:28

>>15
They are in C++, bro.

Name: Anonymous 2011-05-31 14:34

>>16
I knew that. But what about for C#?

Name: Anonymous 2011-05-31 14:38

>>1
Look up ''Reflection and Dynamic Class Loading´´.
If your poor communication skills have failed you and you actually mean object (class instance) you should look up serialization.

Name: Anonymous 2011-05-31 14:42

>>18
And there are some OOP languages where the object and the class are the same thing. Ie, there is no class instance.  But I doubt that someone like you would have known such an obscure fact.

Name: Anonymous 2011-05-31 14:46

>>19
And I just mentioned this because I don't know if C# has such a notion.

Name: Anonymous 2011-05-31 14:52

>>19
There are some languages where there are no objects at all! But I doubt that someone like you would have known such an obscure fact.

Maybe stick to C# since that is what the question is about?

Name: Anonymous 2011-05-31 14:53

>>19
Class: type of object
Object: instance of class

The Singleton pattern is the only instance where your question would yield a truth answer, otherwise no.

Name: Anonymous 2011-05-31 14:54

>>21
Well, I'm just trying to keep up with the low standard here. I mean, every other fucking thread seems to come down to

a)Discussing some Lisp dialect.
b)Calling someone a jew.
c)Calling someone a nigger.
d)Someone bitch about how the jews are after them.

Name: Anonymous 2011-05-31 14:57

>>22
And what happens if you bind the values, and not the type at run time bitch? Does the tooth fairy come out? Does your boyfriend start running around safeway in your pink tights?

Name: Anonymous 2011-05-31 14:57

>>1
You want serialization.

Name: Anonymous 2011-05-31 15:00

>>24
What point are you even trying to make? I don't understand what you're saying. You appear to be buttmad, as the insults:programming discussion ratio is above 1.

Name: VIPPER 2011-05-31 15:01

The jews are after me.

Name: Anonymous 2011-05-31 15:01

>>26
That there are some loser languages where the class and the instance are the same thing. I don't know if C# falls into this category.

Name: Anonymous 2011-05-31 15:02

>>28
Such a thing can possibly happen if you bind the values and not the type.

Name: Anonymous 2011-05-31 15:02

>>26
I believe what >>24 is referring to is the fact that even with a singleton pattern the object and the class is seperate entities.
Non-static members of the class are still only accessible through the instance, regardsless of the fact that you can access the instance throught the class.

Name: Anonymous 2011-05-31 15:04

Can we please get rid of jerks who read SICP and now think that they are programmers and actually get a real programmer on here.

Name: Anonymous 2011-05-31 15:05

>>30
That's pretty close. You get partial credit for that response.

Name: Anonymous 2011-05-31 15:07

>>28
It doesn't.
There is some limited control of classes at runtime through Reflection.

Sage is considered polite. Welcome to the textboards.

Name: Anonymous 2011-05-31 15:08

>>31
OKAY YOU FUQIN ANGERED AN EXPERT PROGRAMMER
GODFUCKIGNDAMN
FIRST OF ALL, YOU DON'T FUQIN KNOW WHAT A REFERENCE MANUAL IS.
SECONDLY, THIS IS /prog/ DO NOT DEMAND USEFUL ANSWERS THE WAY YOU WANT THEM TO BE
THIRDLY PROGRAMMING IS ALL ABOUT PHILOSOPHY AND ``ABSTRACT BULLSHITE'' YOU WILL NEVER COMPREHEND
AND FUQIN LASTLY, FUCK OFF WITH YOUR BULLSHYT
EVERYTHING HAS ALREADY BEEN ANSWERED IN >>8,10,25

Name: 2013-11-26 21:37


Don't change these.
Name: Email:
Entire Thread Thread List