所以我有这个结构:
public struct PurchaseOrderStatus {
public const string Open = "Open", Received = "Received";
}
如果我有以下情况,我该如何转换:
string status = "Open";
至:
PurchaseOrderStatus.Open;
通过转换,我的意思是,我该怎么做:
PurchaseOrderStatus POS;
String status = "Open";
POS = status;