Hi Andrej,
you can convert your array to a List<object> - and then any member can contain anything, even other lists.
But maybe Robert has a better idea.
Wolfgang
P.S. I would go away from multidimensional arrays and use single dimension arrays of objects - I'm doing such changes also in my VO code whenever I touch older code where I have used multidimensional arrays
Mixing C# and X#
Mixing C# and X#
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
-
- Posts: 31
- Joined: Mon Nov 02, 2015 2:08 pm
Mixing C# and X#
Thank you Wolfgang, I will follow your advice. Do you think that continuing to use some win32.dll functions (GetProfileString ...) and also using DBF files could lead me in some troubles in ASP.NET Core world ? I am also asking myself with such doubts because I am aware that Blazor code can be used in Linux op.system. I am asking this mainly for server side oriented Web applications.
TIA Andrej
TIA Andrej
Mixing C# and X#
Hi Andrej,
unfortunately I have no experience with .NET Core or ASP.NET or Blazor.
But you should try to not use any Win32 DLL functions if you plan to use your application also on other operating systems like Linux.
AFAIK the X# RDD was written using .NET file read/write functionalities, so is should also work on Linux - but here to have better ask Fabrice if he has tried something (he has shown X# applications on Linux a few times) or Robert if he knows anyone that has tried it.
Wolfgang
unfortunately I have no experience with .NET Core or ASP.NET or Blazor.
But you should try to not use any Win32 DLL functions if you plan to use your application also on other operating systems like Linux.
AFAIK the X# RDD was written using .NET file read/write functionalities, so is should also work on Linux - but here to have better ask Fabrice if he has tried something (he has shown X# applications on Linux a few times) or Robert if he knows anyone that has tried it.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Mixing C# and X#
Andrej,
We have tested the X# runtime on Linux. But I do not know anyone that uses this in production.
Our low level file IO (which is used by the RDDs) uses managed file streams.
When running on windows and in shared mode we are using a special file stream to overcome some problems that the managed streams have (they are buffering too much so the changes made by other users are not visible in time).
In one of the net builds we will be adding buffering to the file streams that are used by the RDD system, but that is all done in managed code so it should run on any platform.
If you want to run outside windows you should avoid calling Win32 calls such as the functions to read/write INI files.
But is is not too difficult to replace that with managed code that reads these files with managed streams.
I am sure that a search on the web will result in many solutions for this. Look for C# and Ini files and you will find what you need.
Robert
We have tested the X# runtime on Linux. But I do not know anyone that uses this in production.
Our low level file IO (which is used by the RDDs) uses managed file streams.
When running on windows and in shared mode we are using a special file stream to overcome some problems that the managed streams have (they are buffering too much so the changes made by other users are not visible in time).
In one of the net builds we will be adding buffering to the file streams that are used by the RDD system, but that is all done in managed code so it should run on any platform.
If you want to run outside windows you should avoid calling Win32 calls such as the functions to read/write INI files.
But is is not too difficult to replace that with managed code that reads these files with managed streams.
I am sure that a search on the web will result in many solutions for this. Look for C# and Ini files and you will find what you need.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Mixing C# and X#
I use a class for this Johan Nel kindly shared years ago - which is in X#. Maybe he would contribute this. Would be nice, if we could create a community filled "repo" in download, mainly for the bread and butter toolsrobert wrote:If you want to run outside windows you should avoid calling Win32 calls such as the functions to read/write INI files.But is is not too difficult to replace that with managed code that reads these files with managed streams.
I am sure that a search on the web will result in many solutions for this. Look for C# and Ini files and you will find what you need.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Mixing C# and X#
Hi Karl,
Or maybe add it to the Wiki?
Wolfgang
I would do that immediatly. Do you have any idea how to accomplish that? A simple directory or a page with documentation?Would be nice, if we could create a community filled "repo" in download, mainly for the bread and butter tools
Or maybe add it to the Wiki?
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
-
- Posts: 31
- Joined: Mon Nov 02, 2015 2:08 pm
Mixing C# and X#
Thank you to all. As I go deeply my question for function GetProfileString was a product of my lack of knowledge.
GetProfileString is a part of kernel32.dll (Windows 10 and other desktop Windows op. system) so using it in a Web server applications would lead me probably in a runtime errors .
If anybody will be interested I am preparing a "Development notes using X# in Blazor".
Next step theme in researching will be about X# ResourceFile class in a multilingual Blazor app.
Robert and others Dev Team you really did a GREAT JOB !! :cheer:
GetProfileString is a part of kernel32.dll (Windows 10 and other desktop Windows op. system) so using it in a Web server applications would lead me probably in a runtime errors .
If anybody will be interested I am preparing a "Development notes using X# in Blazor".
Next step theme in researching will be about X# ResourceFile class in a multilingual Blazor app.
Robert and others Dev Team you really did a GREAT JOB !! :cheer:
Mixing C# and X#
Hi Andrej,
GetProfileString() works also on Windows servers.
Windows Server is "only" Windows Professional with severel different settings and several added applications.
Wolfgang
GetProfileString() works also on Windows servers.
Windows Server is "only" Windows Professional with severel different settings and several added applications.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Mixing C# and X#
Hi Karl,
Regards,
Just a bit busy since I moved town a month ago so still busy finding my feet and settling into my new environment. I will gladly share the jhnIniFile class with anybody interested. I have a couple of new features that I want to implement, give me a week or two. In meantime I can share as is.FFF wrote: I use a class for this Johan Nel kindly shared years ago - which is in X#. Maybe he would contribute this. Would be nice, if we could create a community filled "repo" in download, mainly for the bread and butter tools
Regards,
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
-
- Posts: 200
- Joined: Wed Oct 09, 2019 6:51 pm
Mixing C# and X#
I'd argue for something on Github...
wriedmann wrote:I would do that immediatly. Do you have any idea how to accomplish that? A simple directory or a page with documentation?Would be nice, if we could create a community filled "repo" in download, mainly for the bread and butter tools
Or maybe add it to the Wiki?