Answered by:
store order status strings in VB

Question
-
User-642154842 posted
Hi ,
can any one tell me how will this be in VB?
public static readonly string[] OrderStatuses = {"Order placed, notifying customer", // 0 "Awaiting confirmation of funds", // 1 "Notifying supplier—stock check", // 2 "Awaiting stock confirmation", // 3 "Awaiting credit card payment", // 4 "Notifying supplier—shipping", // 5 "Awaiting shipment confirmation", // 6 "Sending final notification", // 7 "Order completed", // 8 "Order cancelled"}; // 9
Thanks
Monday, November 23, 2009 4:05 AM
Answers
-
User1006193418 posted
thanks for the reply
Did you use the C# To VB Converter?, cos i tryed that but it does not work
Hi,
Please make sure not to put this code in the same line as VB.NET doesn't support one statement in several lines. If you do need to separate the array into several lines, you can have a try on this demo.
Public Shared ReadOnly OrderStatuses As String() = {"Order placed, notifying customer", _ "Awaiting confirmation of funds", _ "Notifying supplier—stock check", _ "Awaiting stock confirmation", _ "Awaiting credit card payment", _ "Notifying supplier—shipping", _ "Awaiting shipment confirmation", _ "Sending final notification", _ "Order completed", _ "Order cancelled"}
Best Regards,
Shengqing Yang- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, November 24, 2009 4:15 AM
All replies
-
User1947173724 posted
- Public Shared ReadOnly OrderStatuses As String() = {"Order placed, notifying customer", "Awaiting confirmation of funds", "Notifying supplier—stock check", "Awaiting stock confirmation", "Awaiting credit card payment", "Notifying supplier—shipping", _
- "Awaiting shipment confirmation", "Sending final notification", "Order completed", "Order cancelled"}
Monday, November 23, 2009 6:43 AM -
User-642154842 posted
thanks for the reply
Did you use the C# To VB Converter?, cos i tryed that but it does not work
Monday, November 23, 2009 9:36 AM -
User1947173724 posted
It should work if you have placed the code as a global variable.That is it should be accessible to the entire class, not for a specific method or event.It should work if you have placed the code as a global variable.
That is it should be accessible to the entire class, not for a specific method or event.
If you need to declare it as a local variable, you can do that as specified below:
Dim OrderStatuses As String() = {"Order placed, notifying customer", "Awaiting confirmation of funds", "Notifying supplier—stock check", "Awaiting stock confirmation", "Awaiting credit card payment", "Notifying supplier—shipping", "Awaiting shipment confirmation", "Sending final notification", "Order completed", "Order cancelled"}
Monday, November 23, 2009 11:43 PM -
User1006193418 posted
thanks for the reply
Did you use the C# To VB Converter?, cos i tryed that but it does not work
Hi,
Please make sure not to put this code in the same line as VB.NET doesn't support one statement in several lines. If you do need to separate the array into several lines, you can have a try on this demo.
Public Shared ReadOnly OrderStatuses As String() = {"Order placed, notifying customer", _ "Awaiting confirmation of funds", _ "Notifying supplier—stock check", _ "Awaiting stock confirmation", _ "Awaiting credit card payment", _ "Notifying supplier—shipping", _ "Awaiting shipment confirmation", _ "Sending final notification", _ "Order completed", _ "Order cancelled"}
Best Regards,
Shengqing Yang- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, November 24, 2009 4:15 AM -
User-642154842 posted
thanks
Tuesday, November 24, 2009 6:56 AM