Hi
First of all, i have no idea about the DotNet world and Compiler technology. I am using VO2.7 and i am happy. When XSharp is handle DBDCDX and i can simply move my code to XHarp i wanna change to X#. Coz VO is going old and afraid one day the OS will not let it run.
I understand that X# is written with C# and i know there is plenty of C# Code outside. So the question is , is it possible to mix this two 'languages' ? So some modules are from C# and some from X# ? So i can call a C# Function from my X# Code like :
cResult := cFunction ('whatever')
Horst
C# and XSharp
C# and XSharp
Hi!
Yes, you can mix as many different languages as you want. Not in the same .exe or .dll file, but from a x# .exe you can use everything that is included in a c# .dll etc and vice versa. Actually, almost all the base .Net Framework classes are written in c#, but can be used of course from every .Net language! Mixing languages is one of the most powerful features of .Net.
Chris
Yes, you can mix as many different languages as you want. Not in the same .exe or .dll file, but from a x# .exe you can use everything that is included in a c# .dll etc and vice versa. Actually, almost all the base .Net Framework classes are written in c#, but can be used of course from every .Net language! Mixing languages is one of the most powerful features of .Net.
Chris
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
C# and XSharp
Hi Horst,
you can have a DLL written in C# that defines a class named "Class1" - this DLL can be your own DLL or from another author, with or without sources is indifferent.
In your X# application then you can use the class1 directly:
oObject1 := Class1{}
or you can create a class that inherits from Class1:
class Class2 inherit Class1
and use the new class:
oObject2 := Class2{}
The more you work with .NET, the more you will find samples for your problems in the internet.
And then .NET gives you completely new concepts:
In VO you write
SLen( cString )
in X# you can write
cString:Length
Wolfgang
other than what Chris wrote:I understand that X# is written with C# and i know there is plenty of C# Code outside. So the question is , is it possible to mix this two 'languages' ? So some modules are from C# and some from X# ? So i can call a C# Function from my X# Code like :
you can have a DLL written in C# that defines a class named "Class1" - this DLL can be your own DLL or from another author, with or without sources is indifferent.
In your X# application then you can use the class1 directly:
oObject1 := Class1{}
or you can create a class that inherits from Class1:
class Class2 inherit Class1
and use the new class:
oObject2 := Class2{}
The more you work with .NET, the more you will find samples for your problems in the internet.
And then .NET gives you completely new concepts:
In VO you write
SLen( cString )
in X# you can write
cString:Length
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
C# and XSharp
I will try it with X# . Hope the DBFCDX support and a little SSATutor is soon avaiable.
C# and XSharp
Well, that needs actually ony keystroke MORE - <s,cr>wriedmann wrote:And then .NET gives you completely new concepts:
In VO you write
SLen( cString )
in X# you can write
cString:Length
Wolfgang
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)
-
- Posts: 178
- Joined: Sat Dec 05, 2015 10:44 am
- Location: Germany
C# and XSharp
No, type cString:Le and the intellisense does the rest.And then .NET gives you completely new concepts:
In VO you write
SLen( cString )
in X# you can write
cString:Length
Wolfgang
Well, that needs actually ony keystroke MORE - <s,cr>
By the was, with USING type you can still use the old behaviour of using functions. This you don't need to change your code. Examples will be available later.
Frank
C# and XSharp
Hi Guys,
Just want to know if X# is more like C# or like VO and the likes...
Regards
Kannan
Just want to know if X# is more like C# or like VO and the likes...
Regards
Kannan
C# and XSharp
Hi Kannan,
You can write
as in VO, and
as in C#.
But the language itself is more VO, as you have if/else/endif, function, method, do case/endcase. X# adds foreach.
The semicolon ";" is a "line continuator" as in VO and Clipper, not a line terminator as in C#, and you don't have to write all these {} as in C#.
The types are specified with "as"
and there will be also arrays, codeblocks and usuals as in VO (currently they are'nt implemented). And there are functions (C# don't knows them).
Wolfgang
P.S. if you like to see X# code, look at the samples forum.
I would say: both.Just want to know if X# is more like C# or like VO and the likes...
You can write
Code: Select all
SLen( cString )
Code: Select all
cString:Length
But the language itself is more VO, as you have if/else/endif, function, method, do case/endcase. X# adds foreach.
The semicolon ";" is a "line continuator" as in VO and Clipper, not a line terminator as in C#, and you don't have to write all these {} as in C#.
The types are specified with "as"
Code: Select all
cString as string
Wolfgang
P.S. if you like to see X# code, look at the samples forum.
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
C# and XSharp
Thank you for the reply.
Since I have not used VO before, except CULE during the Beta days..
I would like to see if I could translate my Clipper/xHarbour project in record time
as I have a version in C#.
Regards
Since I have not used VO before, except CULE during the Beta days..
I would like to see if I could translate my Clipper/xHarbour project in record time
as I have a version in C#.
Regards
-
- Posts: 178
- Joined: Sat Dec 05, 2015 10:44 am
- Location: Germany
C# and XSharp
Hi Kannan,
i have to convert my clipper apps too this year. Last chance to do that. I want to use most of the code there.
For that I have to to:
- Emulate the TBrowse behaviour as much as possible.
- Design new forms for the READ/GET. Maybe someone is able to do a Facelift (Paul?) for that.
Most of the rest should work with minor changes. The language is very similar.
Frank
i have to convert my clipper apps too this year. Last chance to do that. I want to use most of the code there.
For that I have to to:
- Emulate the TBrowse behaviour as much as possible.
- Design new forms for the READ/GET. Maybe someone is able to do a Facelift (Paul?) for that.
Most of the rest should work with minor changes. The language is very similar.
Frank