CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2013
    Posts
    1

    Why can't I use BinaryWriter?

    I have
    Code:
    var writeTest = new BinaryWriter();
    and I get the following error: "System.IO.BinaryWriter() is inaccessible due to it's protection level". How do I come around this?

  2. #2
    Join Date
    Mar 2013
    Posts
    6

    Re: Why can't I use BinaryWriter?

    BinaryWriter has no constructor that takes 0 parameters. You must provide some parameters that match one of the three overloads.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured