Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1095369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:06:47+00:00 2026-05-17T00:06:47+00:00

I create a .NET (WPF) Application, and compile it to .EXE. Then I create

  • 0

I create a .NET (WPF) Application, and compile it to .EXE. Then I create a second project, and add a reference to the compiled .exe, I can see all the classes and forms, and can use them for automation, etc.

I want to prevent other people from using my compiled .exe as a .dll, so I changed all my classes to ‘Friend’ instead of ‘Public’, but this doesn’t work for the (wpf) forms. And every time I create a new class, I must remember to change it to ‘Friend’.

So, is there a better solution for preventing your app to be used as a DLL?

UPDATE: I am aware that .NET is easily decompilable, and that the access modifiers can be modified by a determined ‘cracker’. But I only want to make it a little harder, than just adding a reference.

Maybe i should have stated my question differently: How can I make all forms/classes in my project ‘Friend’, without specifying it for every item.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:06:48+00:00Added an answer on May 17, 2026 at 12:06 am

    There’s little you can do, ultimately; reflection will let you get around any access declarations you make.

    You could obfuscate your code to make it more difficult to understand and therefore use, but it won’t protect against a determined intrusion.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the problem when I create blank wpf .Net 3.5 project. Visual studio
Using WPF .NET 4.0 in VS2010 RTM: I can't create a fullscreen WPF popup.
I have a .NET 4.0 WPF application where the user can change the language
I need to create a desktop WPF application in .NET. The application communicates with
Environment Visual Studio 2008 SP1 Visual C# WPF Application Project .NET Framework 3.5 Problem
I am trying to create a basic WPF application that can store an encrypted
We have created a beautifully designed .NET WPF desktop application. We are installing the
I'm trying to accomplish the following in ASP.Net: Create a WPF Canvas control Spin
I have created a wpf vb.net project and am trying to set a simple
I'm trying to create ASP.NET MVC Application with Entity Framework, which has One to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.