What is parsing?

Parsing usually applies to text – the act of reading text and converting it into a more useful in-memory format, “understanding” what it means to some extent. So for example, an XML parser will take the sequence of characters (or bytes) and convert them into elements, attributes etc. In some cases (particularly compilers) there’s a … Read more

Can anyone explain IEnumerable and IEnumerator to me? [closed]

for example, when to use it over foreach? You don’t use IEnumerable “over” foreach. Implementing IEnumerable makes using foreach possible. When you write code like: it’s functionally equivalent to writing: By “functionally equivalent,” I mean that’s actually what the compiler turns the code into. You can’t use foreach on baz in this example unless baz … Read more

I am getting Failed to load resource: net::ERR_BLOCKED_BY_CLIENT with Google chrome

These errors are usually generated from an ad blocking plugin, such as Adblock Plus. To test this use either a different browser or uninstall the ad blocking plugin (right clicking the extension by the URL bar and clicking “Remove from Chrome…”). There is an easier way to temporarily disable an extension. In Chrome, opening an … Read more

Unexplained crashes related to ntdll.dll

I have an application that I’ve written that crashes intermittently, but I’m unable to capture an exception at the application layer. I always get an entry in the event log but doesn’t give me much info: As you can see, I get this: Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll. I’m not sure what that is or how … Read more

What is a PDB file?

A PDB file contains information for the debugger to work with. There’s less information in a Release build than in a Debug build anyway. But if you want it to not be generated at all, go to your project’s Build properties, select the Release configuration, click on “Advanced…” and under “Debug Info” pick “None”.

What is a NullReferenceException, and how do I fix it?

What is the cause? Bottom Line You are trying to use something that is null (or Nothing in VB.NET). This means you either set it to null, or you never set it to anything at all. Like anything else, null gets passed around. If it is null in method “A”, it could be that method “B” passed a null to method “A”. null can have different meanings: Object variables … Read more

How can I convert String to Int?

Try this: or better yet: Also, since Int32.TryParse returns a bool you can use its return value to make decisions about the results of the parsing attempt: If you are curious, the difference between Parse and TryParse is best summed up like this: The TryParse method is like the Parse method, except the TryParse method does not throw an exception if the conversion … Read more