It could also be worth mentioning that since Main is static inside Program class, the code there does not have access to any instance of Program class, this keyword is not valid in static members.
Tasks field is non-static and can't be set without an instance of Program class (think p=new Program() > p.Tasks can be set), instead make the field static as well.
Instead of the loop in BuildStringFromArray you can use String.Join method:
var content = string.Join("\n", modFileContentArray);
When using StreamWriter there is a NewLine property that can be set to customize line terminator.
It is due to AutoScroll and which control that has focus, when resizing that control is kept in scroll view.
If you always want top-left corner of form visible when resizing you could handle Resize event and set AutoScrollPosition = Point.Empty.
The full namespace for Image class is iText.Layout.Element. iText 8.0.2 API: iText.Layout.Element Namespace Reference
When you're working with the iText.Layout.Document class the namespace iText.Layout is usually imported already.
Line 12 if statement should remove ;
Line 45 should be removed, closing the document on line 46 also closes the writer it uses (unless SetCloseWriter(false) was called). Throws exception otherwise.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.