Browsing 7239 questions and answers with Jon Skeet
Basically, there's no byte array which would be encoded to 10==. If a base64 string ends with ==, that means that the final 4 characters only represent a single byte. So only the first character and the first 2 bits of the second... more 8/21/2014 10:03:33 PM
I suspect the problem is that you're creating an instance of Quote, and not overridden ToString in your Quote class. Given that you're currently only pulling out the content anyway, I'd just create a List<string> instead: var quotes... more 8/21/2014 8:23:46 PM
If you're always replacing one character with another, it's probably simplest to convert it to a char[] and go through it one character at a time, fixing each one appropriately - rather than doing "all the As" and then "all the... more 8/21/2014 4:27:59 PM
You just need to escape the double-quote within the string literal: String x = "return \"My name is X\" "; There are other characters which can be escaped like this too - for example: String tab = "before\tafter"; (That's "before",... more 8/21/2014 4:14:40 PM
I assume you want to get the value of the property and convert that to a byte, right? Not the property itself... so: var conv = Convert.ToByte(p.GetValue(obj, null)); It seems odd to have it as a byte rather than a bool, admittedly...... more 8/21/2014 3:46:18 PM
The problem is that your original data is binary data, but you're converting it to a string after you've decrypted it. So you just need to change your method to return a byte[], then change the end of your decryption method to: using... more 8/21/2014 3:04:51 PM
The problem is that your string literal doesn't have any line breaks. To faithfully represent the original text, you'd need: String cert_1= "-----BEGIN CERTIFICATE-----\n" +... more 8/21/2014 2:45:11 PM
The supposedly problematic line already works: // This compiles fine car.CarColorNumber = 0; It wouldn't compile for any integer value other than a constant of 0, however. There's an implicit conversion from a constant value of 0 to any... more 8/21/2014 1:51:21 PM
I suspect it is running concurrently - but that the degree of concurrency is being limited by the HTTP connection pool. You might to change ServicePointManager.DefaultConnectionLimit or set it in your app.config with the... more 8/21/2014 1:36:33 PM
The full details are in the C# language specification, section 7.16. Additionally, I have an article in my Edulinq blog series which you may find simpler to read. However, for your particular case... secondary from calls always end up... more 8/21/2014 12:54:37 PM