CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Grofit

Page 1 of 15 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    2
    Views
    1,833

    Reflecting on private static method

    Hey,

    First of all this is not some normal action I would want to do, however this fringe case involves alot of legacy code I cannot touch, and unit tests that need to be written for newer stuff.
    ...
  2. Replies
    5
    Views
    950

    Re: Crazy overidding Equals behaviour

    Will do, thanks for the advice!
  3. Replies
    5
    Views
    950

    Re: Crazy overidding Equals behaviour

    Just incase this is one of those important facts i have overlooked, it also includes generics...

    So it would be more accurate to say the test code looks something like:




    protected void...
  4. Replies
    5
    Views
    950

    Re: Crazy overidding Equals behaviour

    Hey mutant,

    If that were the case then I wouldnt be in this position, im calling equals on an instance of the class... so an example would be:




    var myClass1 = new ThisClass();
    var...
  5. Replies
    5
    Views
    950

    Crazy overidding Equals behaviour

    Hey,

    Im going a bit nuts, ive got a class which using the resharper built in equality creator has 2 equals methods...



    public override bool Equals(object obj)
    {
    return...
  6. Re: Error marshalling pointer to struct with char[]

    Solved it luckily, after trying pretty much every unmanaged type it ends up that:



    [MarshalAs(UnmanagedType.ByValArray, SizeConst = XX)]


    Is what you need...
  7. Re: Error marshalling pointer to struct with char[]

    Just a quick bump as im banging my head on a wall with this one and its holding me up...
  8. Replies
    6
    Views
    1,532

    Re: Separating source code and xml documentation

    Yeah ive done this already, but it just makes everything a bit harder to navigate...

    Not end of the world or anything, but just wanted to know if there was a way to seperate things out...
  9. [RESOLVED] Error marshalling pointer to struct with char[]

    Hello,

    Im using the Marshal.PtrToStructure method to convert bytes in a file to a structure, however it seems to have problems when i have arrays within the structures.

    Here is an example...
  10. Replies
    6
    Views
    1,532

    Re: Separating source code and xml documentation

    :( oh well thanks for letting me know!
  11. Re: reading and writing structs with streams?

    Found out how to do it:

    http://www.codeproject.com/KB/files/fastbinaryfileinput.aspx
  12. [RESOLVED] reading and writing structs with streams?

    Hey,

    In C++ its easy enough to just read bytes from a file into a struct, does C# offer anything similar?

    Im doing alot of work at the moment with older files that all have headers then...
  13. Replies
    6
    Views
    1,532

    Separating source code and xml documentation

    Hey,

    Is it possible to separate the documentation from the source code? It can get a bit hard to read files when it is heavily documented (using the xml docs), so i was wondering if there was a...
  14. A few questions (not specific to C#) about playing audio files

    Hey,

    A friend of mine is need of a simple application where he can play an ambient track and then play other sounds over the top at intervals. I think there is something similar called Syrinscape...
  15. Replies
    8
    Views
    1,080

    Re: ReadLine with Stream

    The unit tests pass, but I will test it with a real resource later when i get home.

    The thing that i want to avoid is doing LOTS of ReadByte() as i will be reading ALOT of resources and seems...
  16. Replies
    8
    Views
    1,080

    Re: ReadLine with Stream

    Thats pretty much what im doing there, my actual code is a bit more elegant (but not much).

    The scenarios im aware of are:

    CR - Linux and MacOSX (few others too)
    CR + LF - Mainly...
  17. Replies
    8
    Views
    1,080

    Re: ReadLine with Stream

    Problem is that (i may be wrong) Environment.NewLine is based on the underlying O/S, so if you were on linux it would be LF or if it was windows it would be CR + LF.

    Which sounds great, but if you...
  18. Replies
    8
    Views
    1,080

    Re: ReadLine with Stream

    Here is what ive currently got, but it doesnt seem that nice...



    public static byte[] ReadLine(this Stream stream)
    {
    var byteList = new List<byte>();
    var...
  19. Replies
    8
    Views
    1,080

    ReadLine with Stream

    Hey,

    Just a quick question, ive got a Stream, and i have alot of new lines that indicate that everything currently read should be commited to a list and a new variable should be created for the...
  20. Replies
    9
    Views
    1,493

    Re: Dealing with Async sockets (TCP)

    Hey,

    Yeah thought about putting a token on, i just wondered how they did it back in the day... well my main question has been answered so im gonna go do some more research on MUDs and see how they...
  21. Replies
    9
    Views
    1,493

    Re: Dealing with Async sockets (TCP)

    Oh sorry Multi User Dungeons, just text based MMOs really... back from ye oldy computing days...

    Basically its just something that has to work with a really basic telnet client...
  22. Replies
    9
    Views
    1,493

    Re: Dealing with Async sockets (TCP)

    Thats what i used on one of my previous TCP apps, so i had a custom header and just told it the message type and message length...

    A guy i was talking to recently brought up the subject of MUDs...
  23. Replies
    9
    Views
    1,493

    Re: Dealing with Async sockets (TCP)

    So based on your last example there, when you send over 32 bytes then send another 32 bytes, am I right in saying you could get up to the whole 64 bytes at once as one big receive?

    I was...
  24. Replies
    0
    Views
    669

    DI question - fluent config vs xml config

    Hey,

    Im not trying to start a major comparison or anything as each DI framework has its own pros/cons, however im interested in using Ninject as I can target silverlight and other frameworks with...
  25. Replies
    9
    Views
    1,493

    [RESOLVED] Dealing with Async sockets (TCP)

    Hey,

    I just wanted to ask about something which im a little confused about at the moment...

    When I have setup my socket (bind/listen then beginaccept) and i have a client connect up, the client...
Results 1 to 25 of 358
Page 1 of 15 1 2 3 4





Click Here to Expand Forum to Full Width

Featured