Click here to Skip to main content
15,881,938 members

Comments by Rob Philpott (Top 200 by date)

Rob Philpott 21-Dec-23 10:16am View    
Yeah, I don't know actually - I don't think I've ever attempted to create a deep clone that can cope with any type, normally you have some insight about what you're cloning, members might be decorated for serialisation etc. Maybe some reflective approach might work, or some solution using expression trees for maximum performance. I found this - might be worth a go: https://stackoverflow.com/questions/129389/how-do-you-do-a-deep-copy-of-an-object-in-net
Rob Philpott 21-Dec-23 9:50am View    
Serialising to JSON and back out again is a pretty nasty way of cloning objects. Interesting you eventually run out of memory too, that suggests some sort of memory fragmentation otherwise the garbage collector should keep you running. What type goes into generic parameter T? Is it always the same, often different, could it be anything or do you have control over the types that go in there?
Rob Philpott 18-Jul-23 10:01am View    
As mentioned above, it appears to be the server that is disconnecting you. Could it be that its expecting a secure connection - TLS or something?
Rob Philpott 15-Jul-21 10:37am View    
Sounds like timezones alright. Dates and times can be more confusing than people think. Could you tell us your geographical position and timezone and is the server located nearby or far away and in which timezone?
Rob Philpott 24-Nov-20 9:53am View    
Hello. Try replacing the 'Add' with 'TryAddWithoutValidation' and see if that helps? I'm actually more used to using HttpWebRequest for these types of things, so I'm guessing a bit here.

Also, I replaced your */* with *.*. Old habits..