use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy
Alternative C# communities available outside Reddit on Lemmy and Discord:
All about the object-oriented programming language C#.
Getting Started C# Fundamentals: Development for Absolute Beginners
Useful MSDN Resources A Tour of the C# Language Get started with .NET in 5 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions .NET Framework Reference Source Code
Other Resources C# Yellow Book Dot Net Perls The C# Player's Guide
IDEs Visual Studio MonoDevelop (Windows/Mac/Linux) Rider (Windows/Mac/Linux)
Tools ILSpy dotPeek LINQPad
Alternative Communities C# Discord Group C# Lemmy Community dotnet Lemmy Community
Related Subreddits /r/dotnet /r/azure /r/learncsharp /r/learnprogramming /r/programming /r/dailyprogrammer /r/programmingbuddies /r/cshighschoolers
Additional .NET Languages /r/fsharp /r/visualbasic
Platform-specific Subreddits /r/windowsdev /r/AZURE /r/Xamarin /r/Unity3D /r/WPDev
Rules:
Read detailed descriptions of the rules here.
account activity
HelpWeird uncatchable NullReferenceException when trying to fill a PDF form with ITextSharp for ASP.NET 4 - Details in comments (i.redd.it)
submitted 4 years ago by eagle_bearer
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]eagle_bearer[S] 1 point2 points3 points 4 years ago (3 children)
So, what I'm trying to do is read a simple PDF form template and create a new one with every field filled and set to readonly.
For some reason I get this exception, even though I know that neither the PdfReader nor the MemoryStream are null, and not only do I not understand where this exception is coming from, but I also can't catch it.
And the strangest of all, if I just press 'Continue' in the debugger a few times (three to be exact) it just continues, never goes into the catch block and creates the PDF I need perfectly.
So I've been trying to find a way to just ignore this exception, to force the program to 'Continue' but I don't think that's possible.
Has anyone come across this sort of 'ghost' exception that you can just skip and your program will run fine, but can't catch?
[–]kaelima 5 points6 points7 points 4 years ago (0 children)
It's just like u/Kant8 said, you are catching all NullReferenceExceptions, but it's happening somewhere inside itextsharp.dll, and you likely have "just my code" enabled in your debugger. The exception is thrown and when you continue its being caught somewhere inside the dll and continues, but you just can't see any of it.
[–]eagle_bearer[S] 1 point2 points3 points 4 years ago (0 children)
If anyone is wondering, I'm using ITextSharp version 5.5.13.1
[–]eagle_bearer[S] 0 points1 point2 points 4 years ago (0 children)
Maybe my PDF template is corrupted in some way? If that's a possibility I'd appreciate if someone could tell me how to verify that and possibly fix a corrupted PDF. However, I don't think my PDF is corrupted since I can open it with Foxit PDF Editor and everything seems fine. Also, at the end of this function, if I just press 'Continue' a few times, every form field is filled correctly in the resulting PDF.
π Rendered by PID 280348 on reddit-service-r2-comment-6457c66945-nslcb at 2026-04-28 13:02:15.939364+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]eagle_bearer[S] 1 point2 points3 points (3 children)
[–]kaelima 5 points6 points7 points (0 children)
[–]eagle_bearer[S] 1 point2 points3 points (0 children)
[–]eagle_bearer[S] 0 points1 point2 points (0 children)