C# Programming
08-06-2009, 05:00 PM
perhaps someone can make a suggestion on how to convert this sample C code into c#?...
C code:
#include
long Now;
struct tm *TimeStruct;
char *TimeString = "000000";
char LabelString[256];
TimeStruct = localtime(&Now)
sprintf(LabelString + strlen(LabelString),"%03d%d%04d",TimeStruct->tm_yday+1,TimeStruct->tm_year%10,Serial);
The issue is that I am working on the barcode command using c# and the variable to be:
string barCodeCommand;
I'm stumped on how to convert this into c# with the timestruct. I'm on with Serial variable.
C code:
#include
long Now;
struct tm *TimeStruct;
char *TimeString = "000000";
char LabelString[256];
TimeStruct = localtime(&Now)
sprintf(LabelString + strlen(LabelString),"%03d%d%04d",TimeStruct->tm_yday+1,TimeStruct->tm_year%10,Serial);
The issue is that I am working on the barcode command using c# and the variable to be:
string barCodeCommand;
I'm stumped on how to convert this into c# with the timestruct. I'm on with Serial variable.