3
votes

What I like about Delphi is that the code for all controls and components is available. Its all in what is called the VCL (Visual Component Library) This proved to be very usefull when designing custom controls and components. AFter all, each control and component in Delphi was written in Delphi, so it makes sense to include that code with Delphi so we can look in it and even debug it.

So I am wondering if this is also the case with C# ? I suspect that controls like for example TextBox is written in C# so is it possible to take a look at that code like it is in Delphi ?

1

1 Answers

11
votes

The vast majority of the source to the .NET Framework (including the controls) can be found at:

http://referencesource.microsoft.com/

Specifically, the TextBox class for WinForms can be found here: http://referencesource.microsoft.com/#System.Windows.Forms/winforms/Managed/System/WinForms/TextBox.cs,577a143ad3bbfb97

You can download the source from referencesource.microsoft.com/download.html