© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
23 replies
xirus 𖣂

Error

System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=WinFormsApp3
StackTrace:
at WinFormsApp3.Form1.button2_Click(Object sender, EventArgs e) in C:\Users\actex\source\repos\WinFormsApp3\Form1.cs:line 248
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
at Windows.Win32.PInvoke.DispatchMessage(MSG* lpMsg)
at System.Windows.Forms.Application.ComponentManager.Microsoft.Office.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context)
at WinFormsApp3.Program.Main() in C:\Users\actex\source\repos\WinFormsApp3\Program.cs:line 14
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

validation pipeline using ErrorOr package
C#CC# / help
3y ago
MessagePack erroring
C#CC# / help
4y ago
Async operations cause errorless crash (Task.Run etc.)
C#CC# / help
4y ago
❔ Sockets, SendTo is erroring
C#CC# / help
3y ago