Best C# API to create PDF

Update: I’m not sure when or if the license changed for the iText# library, but it is licensed under AGPL which means it must be licensed if included with a closed-source product. The question does not (currently) require free or open-source libraries. One should always investigate the license type of any library used in a project. I have … Read more

Get dictionary value by key

It’s as simple as this: Note that if the dictionary doesn’t have a key that equals “XML_File”, that code will throw an exception. If you want to check first, you can use TryGetValue like this:

Unity 2d jumping script

Usually for jumping people use Rigidbody2D.AddForce with Forcemode.Impulse. It may seem like your object is pushed once in Y axis and it will fall down automatically due to gravity. Example:

How do I read and parse an XML file in C#?

XmlDocument to read an XML from string or from file. or then find a node below it ie like this or then read the text inside that node like this or read an attribute Always check for null on Attributes[“something”] since it will be null if the attribute does not exist.

Convert char to int in C#

Interesting answers but the docs say differently: Use the GetNumericValue methods to convert a Char object that represents a number to a numeric value type. Use Parse and TryParse to convert a character in a string into a Char object. Use ToString to convert a Char object to a String object. http://msdn.microsoft.com/en-us/library/system.char.aspx

Adding values to a C# array

You can do this way – Alternatively, you can use Lists – the advantage with lists being, you don’t need to know the array size when instantiating the list. Edit: a) for loops on List<T> are a bit more than 2 times cheaper than foreach loops on List<T>, b) Looping on array is around 2 times cheaper than looping on … Read more