JJAA
JJAA

Reputation: 37

Where is the Form class?

Form1 inherits from Form. I would like to see the code of Form but I can not find the file. Where is it ?

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }
}

Upvotes: 1

Views: 90

Answers (2)

Leon Barkan
Leon Barkan

Reputation: 2703

select the Form and click on F12

after that metadata will show up and on the top you can see from which dll it's taken:

#region Assembly System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Windows.Forms.dll
#endregion

using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing;
using System.Runtime.InteropServices;

namespace System.Windows.Forms
{
   ...
}

Upvotes: 0

bassfader
bassfader

Reputation: 1356

You can take a look at the code from the .NET Framework Reference Source site provided by Microsoft. Here is a direct link to the System.Windows.Forms.Form class:

https://referencesource.microsoft.com/#System.Windows.Forms/winforms/Managed/System/WinForms/Form.cs

Upvotes: 2

Related Questions