Hi Chris,
It was my understanding that USUAL's are not "best practise" and that you should avoid using them as much as possible. So I thought it would be useful since StrToFloat() returns a FLOAT instead of USUAL.
Kees.
Search found 171 matches
- Mon Mar 23, 2026 1:58 pm
- Forum: Product
- Topic: Documentation issues
- Replies: 16
- Views: 900
- Mon Mar 23, 2026 10:55 am
- Forum: Product
- Topic: Documentation issues
- Replies: 16
- Views: 900
Re: Documentation issues
Just for the record: In the X# Help document (menu Help -> XSharp Documentation) there is a topic called "StrToFloat Function". But most of the text and the examples mention only the Val() Function. The tooltip of the StrToFloat() function is also about Val(). On the documentation website at https ...
- Wed Mar 18, 2026 3:27 pm
- Forum: Product
- Topic: Documentation issues
- Replies: 16
- Views: 900
Re: Documentation issues
Hi Chris, Wolfgang,
An even shorter version is:
oPersons:Sort({o1, o2 => o1:Name:CompareTo(o2:Name)})
This also works. But the page title on https://docs.xsharp.it/doku.php?id=codesamples:sorting_collection_delegate is "Sorting an object collection using a delegate" and I am curious how to do ...
An even shorter version is:
oPersons:Sort({o1, o2 => o1:Name:CompareTo(o2:Name)})
This also works. But the page title on https://docs.xsharp.it/doku.php?id=codesamples:sorting_collection_delegate is "Sorting an object collection using a delegate" and I am curious how to do ...
- Wed Mar 18, 2026 10:00 am
- Forum: Product
- Topic: Documentation issues
- Replies: 16
- Views: 900
Re: Documentation issues
Hi Robert,
If the compiler knows that CompareTo() returns an INT then I do not understand why I get a compilation error in the code below at the line "RETURN nResult":
FUNCTION TestDelegate() AS VOID
LOCAL oPersons AS List<Person>
LOCAL cText AS STRING
oPersons := List<Person>{}
oPersons:Add ...
If the compiler knows that CompareTo() returns an INT then I do not understand why I get a compilation error in the code below at the line "RETURN nResult":
FUNCTION TestDelegate() AS VOID
LOCAL oPersons AS List<Person>
LOCAL cText AS STRING
oPersons := List<Person>{}
oPersons:Add ...
- Tue Mar 17, 2026 11:34 am
- Forum: Product
- Topic: Documentation issues
- Replies: 16
- Views: 900
Re: Documentation issues
Thank you Robert.
Another thing. It is not really "the documentation" but still a valuable source of information: the docs.xsharp.it website. On the page https://docs.xsharp.it/doku.php?id=codesamples:sorting_collection_delegate&s[]=auto is an example that does not work. There is a compilation ...
Another thing. It is not really "the documentation" but still a valuable source of information: the docs.xsharp.it website. On the page https://docs.xsharp.it/doku.php?id=codesamples:sorting_collection_delegate&s[]=auto is an example that does not work. There is a compilation ...
- Tue Mar 17, 2026 9:32 am
- Forum: Product
- Topic: Documentation issues
- Replies: 16
- Views: 900
Documentation issues
Hi,
It could be just me not being able to find stuff, but there does not appear to be an explanation for the "AUTO" addition in the X# documentation. For example:
PROPERTY FirstName AS STRING AUTO
I can find some places where it is mentioned, such as https://www.xsharp.eu/help/new-feat ...
It could be just me not being able to find stuff, but there does not appear to be an explanation for the "AUTO" addition in the X# documentation. For example:
PROPERTY FirstName AS STRING AUTO
I can find some places where it is mentioned, such as https://www.xsharp.eu/help/new-feat ...
- Sun Dec 28, 2025 2:23 pm
- Forum: Product
- Topic: Translating C# to X#
- Replies: 10
- Views: 2316
Re: Translating C# to X#
Hi Irwin and Chris,
Thank you both very much for explaining it in such detail. That really helps me to understand what is going on. I would like to add one small detail, which is that you have to add "USING System.Linq" otherwise you get Error XS1061 'System.Windows.Forms.Control.ControlCollection ...
Thank you both very much for explaining it in such detail. That really helps me to understand what is going on. I would like to add one small detail, which is that you have to add "USING System.Linq" otherwise you get Error XS1061 'System.Windows.Forms.Control.ControlCollection ...
- Sat Dec 27, 2025 5:00 pm
- Forum: Product
- Topic: Translating C# to X#
- Replies: 10
- Views: 2316
Re: Translating C# to X#
Here another "translation" question. To find which radiobutton in a groupbox (Windows.Forms) is selected, I found this C# example:
groupbox1.Controls.OfType<RadioButton>().FirstOrDefault(r => r.Checked).Name
To do this in X# I got as far as this:
groupbox1:Controls:OfType<RadioButton>()
but ...
groupbox1.Controls.OfType<RadioButton>().FirstOrDefault(r => r.Checked).Name
To do this in X# I got as far as this:
groupbox1:Controls:OfType<RadioButton>()
but ...
- Mon Oct 13, 2025 1:34 pm
- Forum: Product
- Topic: Translating C# to X#
- Replies: 10
- Views: 2316
Re: Translating C# to X#
Hi Chris,
Thank you very much!
aArrayOfInts := <INT> {1,2,3,6,7,0}
Would this be the same as:
aArrayOfInts := ARRAY OF INT
aArrayOfInts := {1,2,3,6,7,0}
Or does the < > make it into something special? It looks like some sort of cast.
LOCAL aPoints AS Point[] // single dim fixed size ...
Thank you very much!
aArrayOfInts := <INT> {1,2,3,6,7,0}
Would this be the same as:
aArrayOfInts := ARRAY OF INT
aArrayOfInts := {1,2,3,6,7,0}
Or does the < > make it into something special? It looks like some sort of cast.
LOCAL aPoints AS Point[] // single dim fixed size ...
- Mon Oct 13, 2025 9:48 am
- Forum: Product
- Topic: Translating C# to X#
- Replies: 10
- Views: 2316
Translating C# to X#
There are a lot of C# code examples on the internet and sometimes I have trouble translating them, in the most efficient way, to X#. For example this piece of code:
// Draw the custom border to appear 3-dimensional.
e.Graphics.DrawLines(SystemPens.ControlLightLight, new Point[] {
new Point (0, e ...
// Draw the custom border to appear 3-dimensional.
e.Graphics.DrawLines(SystemPens.ControlLightLight, new Point[] {
new Point (0, e ...

