E
Eric Stott
I have the following code in VB that needs to be done in C#
Dim o As New Company.Common.QueueItem
o.OrderID = 123456789
o.QueueItemType = Company.Common.QueueItemType.StockOrder
Dim oDispatch As New Company.Queuing.CompanyDispatchQueue(Nothing)
oDispatch.Dispatch(o, True)
I have created the following code in C#, but I am getting a Null Exception
when running it:
queue=new Company.Common.QueueItem();
queue.OrderID=123456789;
queue.QueueItemType=Company.Common.QueueItemType.Refill;
dispatch=new Company.Queuing.CompanyDispatchQueue(null);
dispatch.Dispatch(queue,true);
The definition of Nothing in VB is: Represents the default value of any data
type
Whereas Null in C# is: The null keyword is a literal that represents a null
reference, one that does not refer to any object
What can I use in subtitute of Nothing in C# in this instance?
Dim o As New Company.Common.QueueItem
o.OrderID = 123456789
o.QueueItemType = Company.Common.QueueItemType.StockOrder
Dim oDispatch As New Company.Queuing.CompanyDispatchQueue(Nothing)
oDispatch.Dispatch(o, True)
I have created the following code in C#, but I am getting a Null Exception
when running it:
queue=new Company.Common.QueueItem();
queue.OrderID=123456789;
queue.QueueItemType=Company.Common.QueueItemType.Refill;
dispatch=new Company.Queuing.CompanyDispatchQueue(null);
dispatch.Dispatch(queue,true);
The definition of Nothing in VB is: Represents the default value of any data
type
Whereas Null in C# is: The null keyword is a literal that represents a null
reference, one that does not refer to any object
What can I use in subtitute of Nothing in C# in this instance?