Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
GeneralRe: change win form name Pin
EliottA22-Oct-09 11:10
EliottA22-Oct-09 11:10 
Questionhow to make a form reference public? Pin
genisyssoftware22-Oct-09 8:47
genisyssoftware22-Oct-09 8:47 
AnswerRe: how to make a form reference public? [modified] PinPopular
DaveyM6922-Oct-09 8:58
professionalDaveyM6922-Oct-09 8:58 
GeneralRe: how to make a form reference public? Pin
Christian Graus22-Oct-09 17:35
protectorChristian Graus22-Oct-09 17:35 
GeneralRe: how to make a form reference public? Pin
dan!sh 22-Oct-09 17:45
professional dan!sh 22-Oct-09 17:45 
QuestionHow to drag image from my picturebox to other application(ex.Photoshop) Pin
Kortez222322-Oct-09 7:57
Kortez222322-Oct-09 7:57 
AnswerRe: How to drag image from my picturebox to other application(ex.Photoshop) Pin
Christian Graus22-Oct-09 12:10
protectorChristian Graus22-Oct-09 12:10 
QuestionMouseMove event firing even though I'm not moving my mouse! Pin
WebMaster22-Oct-09 7:51
WebMaster22-Oct-09 7:51 
AnswerRe: MouseMove event firing even though I'm not moving my mouse! Pin
Eddy Vluggen22-Oct-09 8:29
professionalEddy Vluggen22-Oct-09 8:29 
GeneralRe: MouseMove event firing even though I'm not moving my mouse! Pin
WebMaster22-Oct-09 8:43
WebMaster22-Oct-09 8:43 
QuestionCAPICOM Process replacement Pin
Dave Kreskowiak22-Oct-09 7:49
mveDave Kreskowiak22-Oct-09 7:49 
Answer[SOLVED - Sort of...] CAPICOM Process replacement Pin
Dave Kreskowiak22-Oct-09 10:25
mveDave Kreskowiak22-Oct-09 10:25 
QuestionHow to copy a file? Pin
masoudshao22-Oct-09 7:22
masoudshao22-Oct-09 7:22 
AnswerRe: How to copy a file? Pin
Abhijit Jana22-Oct-09 7:31
professionalAbhijit Jana22-Oct-09 7:31 
GeneralRe: How to copy a file? Pin
Ashfield22-Oct-09 9:31
Ashfield22-Oct-09 9:31 
GeneralRe: How to copy a file? Pin
Abhijit Jana22-Oct-09 10:03
professionalAbhijit Jana22-Oct-09 10:03 
AnswerRe: How to copy a file? Pin
Abhishek Sur22-Oct-09 7:48
professionalAbhishek Sur22-Oct-09 7:48 
QuestionWhen to override Equals() ? Pin
Wes Jones22-Oct-09 6:20
Wes Jones22-Oct-09 6:20 
AnswerRe: When to override Equals() ? Pin
Henry Minute22-Oct-09 6:41
Henry Minute22-Oct-09 6:41 
AnswerRe: When to override Equals() ? Pin
DaveyM6922-Oct-09 6:47
professionalDaveyM6922-Oct-09 6:47 
Questioni need a help to convert class to byte [] array Pin
b.sahahf22-Oct-09 4:55
b.sahahf22-Oct-09 4:55 
AnswerRe: i need a help to convert class to byte [] array Pin
Eddy Vluggen22-Oct-09 5:01
professionalEddy Vluggen22-Oct-09 5:01 
GeneralRe: i need a help to convert class to byte [] array Pin
b.sahahf22-Oct-09 5:03
b.sahahf22-Oct-09 5:03 
GeneralRe: i need a help to convert class to byte [] array Pin
Eddy Vluggen22-Oct-09 5:15
professionalEddy Vluggen22-Oct-09 5:15 
b.sahahf wrote:
you can send me a code?


If you pay for it, yes. Otherwise, you'll have to write it yourself. The documentation is usually a good place to start, the link to the BinaryFormatter contains a sample that can almost be copied literally. It contains this sample;
static void Serialize() 
    {
        // Create a hashtable of values that will eventually be serialized.
        Hashtable addresses = new Hashtable();
        addresses.Add("Jeff", "123 Main Street, Redmond, WA 98052");
        addresses.Add("Fred", "987 Pine Road, Phila., PA 19116");
        addresses.Add("Mary", "PO Box 112233, Palo Alto, CA 94301");

        // To serialize the hashtable and its key/value pairs,  
        // you must first open a stream for writing. 
        // In this case, use a file stream.
        FileStream fs = new FileStream("DataFile.dat", FileMode.Create);

        // Construct a BinaryFormatter and use it to serialize the data to the stream.
        BinaryFormatter formatter = new BinaryFormatter();
        try 
        {
            formatter.Serialize(fs, addresses);
        }
        catch (SerializationException e) 
        {
            Console.WriteLine("Failed to serialize. Reason: " + e.Message);
            throw;
        }
        finally 
        {
            fs.Close();
        }
    }
Good luck with your project Smile | :)

I are Troll Smile | :)

GeneralRe: i need a help to convert class to byte [] array Pin
stancrm22-Oct-09 6:12
stancrm22-Oct-09 6:12 

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.