NullReferenceException was not handled.
Object reference is not configured for the object instance.
says the error.
mi1.cs
namespace mip
{
public enum enumMessageType
{
mtA, mtB, mtC, ...
}
afterthought
Form1.cs
namespace mipTest
{
public partial class Form 1:Form
{
private void btnInsert_Click(object sender, EventArgse)
{
QueueInfo qi = new QueueInfo();
qi.CommandInfo.MessageType=enumMessageType.mtA;←This is where the error occurs.
afterthought
Do you have any clue to the solution?
Thank you for your cooperation.
Run debugs, break the line where the error occurs, and look for null.
As it looks, the CommandInfo member variable in the QueueInfo class is likely not initialized.
© 2024 OneMinuteCode. All rights reserved.