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 453743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:12:08+00:00 2026-05-12T22:12:08+00:00

Can somebody tell why and for what it is declared as partial? what is

  • 0
  1. Can somebody tell why and for what it is declared as partial?
  2. what is its use?
  3. Is this possible to declare it without partial?
  • 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-12T22:12:09+00:00Added an answer on May 12, 2026 at 10:12 pm

    It’s declared partial because VS.NET will put “designer” code into a seperate .cs file that is actually, at compile time, part of the same class.

    If you have a Form1.cs you should also have a Form1.Designer.cs on the file system as well. When you drop controls onto a form VS.NET will add code into that designer file. It’s seperate because you don’t want to see or touch that code, and don’t want it getting in the way of your own code.

    So, the partial class feature in C# is mainly there to allow the seperation of your code and designer code. At compile time the two (or more) files making up the partial class become a single class – at runtime there isn’t any difference between a class defined as partial and one that isn’t.

    “Back in the day” before partial existed all the designer code was lumped in with your own, and this made for messy .cs files and the possibility of developers changing code that VS.NET was expecting to have exclusive rights to. So, a Form will work fine (if written without designer support) without being partial (e.g. if you were generating the entire file yourself from a T4 template).

    Why would you want to remove the “partial”?

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

Sidebar

Related Questions

Can somebody tell me why this is possible? An private attribute should only be
can somebody tell me how to use this class timers from python in my
Can somebody tell me what does this mean? I'm going trough Java book and
Specifically, can somebody tell me what is wrong with this piece of code. It
I have a URL like this: http:\/\/www.example.com\/example in a string object. Can somebody tell
Can somebody please tell me how to declare a new instance of a 2-dimensional
Can somebody tell me why this should be wrong? #Each new term in the
can somebody tell me when to use %, em, ex as fonts unit of
Can somebody tell me what's wrong with this code? 1046: Type was not found
Can somebody tell me how to print a string as bytes i.e. its corresponding

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.