voyager

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-11-22
14:13
749 views
[Migrated content. Thread originally posted on 22 November 2011]
Hello,I want to use CultureInfo in a managed project. I set these lines:
$set ilusing "System.Threading"
$set ilusing "System.Globalization"
I do not know how to translate this code (original in C#):
Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");
I find it a 'bit' tricky.... I got an instantation error in the last line.
01 thread type System.Threading.Thread.
01 cuture type System.Globalization.CultureInfo.
set culture to new System.Globalization.CultureInfo(idioma).
set thread::CurrentCulture to culture.
1 Solution
Accepted Solutions
Chris Glazier

Micro Focus Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-11-22
14:23
In Visual COBOL you can do this as follows:
set type Thread::CurrentThread::CurrentCulture to new type CultureInfo("fr-FR")
You don't need the data items as these are static class methods.
set type Thread::CurrentThread::CurrentCulture to new type CultureInfo("fr-FR")
You don't need the data items as these are static class methods.
1 Reply
Chris Glazier

Micro Focus Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-11-22
14:23
In Visual COBOL you can do this as follows:
set type Thread::CurrentThread::CurrentCulture to new type CultureInfo("fr-FR")
You don't need the data items as these are static class methods.
set type Thread::CurrentThread::CurrentCulture to new type CultureInfo("fr-FR")
You don't need the data items as these are static class methods.