My application pulls data from a MySQL database and saves it as CSV file. I have to localize this. the main requirement is that date and number format should be localized while making the CSV file. for ex in German, the delimiter should be ";" instead of " ," . and numbers should have , in place of decimal(1.23 should be 1, 23) and also the date should be in correct format. now the data I am pulling could be of any type, string, single, double, how can I know the type of pulled data, and format it for the installed UI culture before saving it to the CSV file. I know that I can find out the type of the column pulled, and use that, is there a better an efficient way ? Any ideas ? Thanks, Arti
Herhighness
Posts
-
Localization of data -
Static class with static member and memory allocationHi, I have a static class, and it contains a private static member for resource management. static class ConnectionManager { private static ResourceManager resmgr = new ResourceManager("myApplication.stringresources", Assembly.GetExecutingAssembly()); ---------- -------- '''''''''''' } initializing a static member this way, is this right way to do this? every time when this class is called, would it reinitialize the static member, creating new memory allocation? or would I have a single memory allocation alloted the first time class is refereneced? Thanks, herhighness
-
Globalization and Localization in C#.I have an existing C# application, I have to globalize it, and make localization available for german /french and UK english. I have not done this before, and I would appreciate, if some one can guide me to any tutorials, links, books, which can help me do this. Thanks,
-
Wait or Sleep function in C#Hi, I am using a snmp manager component. it sends a broadcast request. the responses of the broadcast are reveived via an event called snmp_OnResponse()event. All the response I received I am trying to store them in a arraylist. which I later want to use to do further processing. But I have no way of knowing when I would have received all the responses. I can make an assumption, by using snmp timeout , and waiting for that amount of time before proceeding to do anything. Is there a wait or sleep function which will reliquish control, and let OnResponse event handle all the incoming responses before proceeding with further function calls? I would appreciate if you can suggest any other approach to solve this. Thanks, Arti
-
StatusStrip Label to the rightI am using a statusstrip control in C#, and I am trying to place a ToolStripLable. I want this label to appear at the right end of statusstrip, Can anyone please tell me how to do this? thanks, arti
-
How to add event handlers for controls added at runtime.I am using a third party SNMP component. I create this component at run-time in a C# class. I am wondering if there is someway I can use event handlers for this control in that class.
-
How to get total no of records from a typed DatasetHello, I have created a typed dataset using a schema, I am trying to create an instance of this dataset and get the row count. It always returns total count as 0, when I know for sure taht there are 3 records, what am I doing wrong.? InstrumentSettings ds = new InstrumentSettings(); ds.ReadXml(@"C:\Instruments.xml"); int x = ds.Instument.Rows.Count; MessageBox.Show (x.ToString()) Thanks,