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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:51:30+00:00 2026-06-04T05:51:30+00:00

Possible Duplicate: What is the use of a partial class? In my code ,there

  • 0

Possible Duplicate:
What is the use of a partial class?

In my code ,there is one partial class for creating new company. I can not understand in which condition partial to be implemented.

public partial class NewCompanyWindow : Window
{
    List<Company> _companies;
    public event EventHandler<CompanyAddedEventArgs> CompanyAdded;

    public NewCompanyWindow()
    {
        InitializeComponent();

        Closing += new
          System.ComponentModel.CancelEventHandler(NewCompanyWindow_Closing);
    }

    void NewCompanyWindow_Closing(object sender,
         System.ComponentModel.CancelEventArgs e)
    {
        StartupWindow w = new StartupWindow();
        w.Show();
    }

    public NewCompanyWindow(List<Company> companies)
        : this()
    {
        _companies = companies;
    }

    private void CreateButton_Click(object sender, RoutedEventArgs e)
    {..

can any one say in which condition partial class is used?

  • 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-06-04T05:51:32+00:00Added an answer on June 4, 2026 at 5:51 am

    Partial classes should be used when you want to split the implementation of a class across multiple code files. Typically, this approach is warranted when you have a class that is partially user-defined and partially generated, such as a Windows Form.

    Part of the class is defined in Form1.cs and the designer-generated code is in Form1.designer.cs. Both class contain implementations of the class Form1, but typically the developer doesn’t edit the code in the ‘designer’ file, but can still customize the Form1 class by editing the Form1.cs file

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

Sidebar

Related Questions

Possible Duplicate: Use of class definitions inside a method in Java Can we have
Possible Duplicate: Why use partial classes? Which way is best practice and the best
Possible Duplicate: Use of var keyword in C# Which one is better? using var
Possible Duplicate: Why not use tables for layout in HTML? Under what conditions should
Possible Duplicate: When to Use Double or Single Quotes in JavaScript Are there differences
Possible Duplicate: Use of var keyword in C# I don't really understand why you
Possible Duplicate: Why use a framework with PHP? To begin with, I just can
Possible Duplicate: Use of var keyword in C# Being relatively new to C# I
Possible Duplicate: Weird use of void I was reading C code and came across
Possible Duplicate: Can you use reflection to find the name of the currently executing

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.