You searched for how does c# work
. We found 81
results in 0.162 seconds.
The bitwise inverse operator is entirely separate from the shift here. You've started with input of 10 (binary) - which has a full 32-bit representation of 00000000_00000000_00000000_00000010 The bitwise inverse is... more
XmlNodeType is an enum. XmlNodeType.Text is a value, not a type, but you're trying to use it as the type of the aa variable. Furthermore ReaderInnerXml() returns a string, so it's not clear how you expect to iterate over it. Do you have... more
Reads within the lock block see the latest versions of a variable and writes within the lock block are visible to all threads. No, that's definitely a harmful oversimplification. When you enter the lock statement, there a memory... more
int x might not have an assignment. That's simply not true. In your case, x is a parameter - it's "definitely assigned" from the start of the method, in specification terminology. When someone calls the method, they have to provide a... more
No, you can't. At least not without reflection, and you shouldn't be using reflection here. Variables in C# are a compile-time concept. (Even with reflection, it'll only work for fields, not for local variables.) If you want a collection... more
A zip file is not a text file, so don't try to use it as if it were. It's vitally important that you distinguish between text data and binary data - not just here, but all over the place. Hashing a file is simple though. Unfortunately as... more
The shift operators always effectively has a right operand in the range 0-31. From the Mozilla docs: Shift operators convert their operands to 32-bit integers in big-endian order and return a result of the same type as the left... more
The oddity here is that your class implement IEqualityComparer<CustomClass> instead of IEquatable<CustomClass>. You could pass in another instance of CustomClass which would be used as the comparer, but it would be more... more
Would the speed of sorting differ with 100 string items which are all 30 string characters? Potentially, yes. Potentially, no. It depends. If you have a bunch of strings which only differ at character 30, that will take longer to sort... more
You could use IndexOf with a case-insensitive comparison: var query = posts.Where( logg => logg.IndexOf(searchKey, StringComparison.CurrentCultureIgnoreCase) != -1); foreach (string result in query) { ... more