-2

I was following along on this post Reading PDF content with itextsharp dll in VB.NET or C# and got red underlines at "StringBuilder" and "Encoding". I have all of the included libraries that were in the answer of the post and ItextSharp.xtra and Itextsharp.pdfa (just to see if one of them fixed the issue), but nothing that I add seems to recognize "StringBuilder" or "Encoding".

What am I doing wrong here?

BoatHouse
  • 57
  • 1
  • 8
  • 1
    It would be awesome if you could provide a [mcve]. Also be sure to include the full text of at least one of the compiler errors in your question. – mjwills Sep 11 '18 at 21:00
  • 2
    I'd say there is a 99% chance you have forgotten the `using` statements at the top of the file and / or haven't referenced the itextsharp DLL. – mjwills Sep 11 '18 at 21:01
  • 1
    Possible duplicate of [StringBuilder namespace, c#, visual studio 2010](https://stackoverflow.com/questions/6261441/stringbuilder-namespace-c-visual-studio-2010) – mjwills Sep 11 '18 at 21:20

1 Answers1

1

You need to add using System.Text; statement to import the required namespace to use StringBuilder and Encoding classes.

orhtej2
  • 2,133
  • 3
  • 16
  • 26