I was looking in this forum for a replacement of the ErrorBlock Method and i found this code and i try to understand
// app execution here
CATCH e AS Exception
LOCAL cMessage AS STRING
cMessage := e:Message
DO WHILE e:InnerException != NULL_OBJECT
e := e:InnerException
cMessage += CRLF+e:Message
Here e will be defined as Exception , my problem is - where can i find the explanation of Exception or other Functions/Classes witch has no VO names?
do i have to look into the C# help ?
and if i found the same name, is it the same ?
Yes all the system classes are the same in x#, c# and any other .Net language, and they can be used in exactly the same way, that's one of the beauties of .Net. And in most aspects (apart from VO/xBase in general features and compatibility ), x# can be used in a very similar way to x#.
I use c# only when I need to do some testing with it
Or during the vulcan days, where the base rdd and ntx drivers (and a very small part of the base runtime) were written in c#. But personally I completely avoid using c# if I can.
Been doing well, thanks, hope you're doing fine also! Sorry, didn't get the t-shirt thing!
//Load Form variables into NameValueCollection variable.
// Get names of all forms into a string array.
String arr1 = coll.AllKeys;
for (loop1 = 0; loop1 < arr1.Length; loop1++)
Response.Write("Form: " + arr1[loop1] + "<br>");
So, here i see: coll == Request.Form
But i cant see why they use the codeword ALLKEYS. what is Coll now ? a Array, a String . if ist a Array ist a multidim Array or a single one ? and why they dont use it directly in the Loop ?
You see, maybe .Net ist powerfull but when you have to many posibilities and no good help/describtion behind its not realy a good thing because you cant find the things you relay need.
i think, this HTTP Class of MS is also using the Basic function like GetEnv () etc .
So i will write my HTTP handling in clear X# / VO Code. And with the VO SDK Classes and Ivo Wessel Juno Class it will not be a hard thing to do that. (mostly works already)
and i hope, the X# Team does not Forget to make a good help
the power of X# is the possibility to use different programminfg styles:
- you can use it like C# with only the .NET framework, but with xBase syntax.
- you can use it like VO with the VO runtime libraries and the VO functions
- you can mix both styles
Since you know VO, and your applications are written in VO, for sure you will adapt the VO style, but since the .NET framework contains a lot of functionality you are dreaming of in VO, earlier or later you will need to use functionalities from the .NET framework.
Regarding the documentation: the X# team can never document the .NET framework, but you will find much more documentation and much, much more samples you had ever in your VO programming. X# can use a syntax that is near to C#, and if you can read a bit of C#, you will solve nearly every problem.
Personally, I'm using more and more X# modules in my VO applications, because I cannot move them over yet, but I need functionalities from the .NET framework.
There is a lot to learn, and for sure sometimes you will get frustrated, but at the end you will have a lot of fun.
So the AllKeys property returns a (single dimension) array of strings (string), which contains only the keys from the collection. And the code stores this array that results from AllKeys in an intermediate local variable (arr1), because every time this property is called, this array is generated again. So in order to make sure that this is called only once, the code uses the intermediate variable, it's just for performance reasons.
About documenting the .Net classes, as the guys said, we cannot do that, the size of the .Net framework is incredibly immense, I'm sure it has taken dozens or hundreds of people at MS to document it. And indeed, some times the documentation is not good enough, but after a few weeks that you will be used to it, it will seem a lot easier. We've all been through this process in the past.
My short comment was a very simple one really - your post had said something like "X# can be used like X# most of the time" when I think you meant "X# can be used like C# most of the time".
I then sympathised with you as in my eNotes I often find myself making similar mistakes. Its had to get it right all the time.
So my comment was about mixing up the terms X# and C# and not mixing up the programming code in apps.
I like you use X# all the time now that I don't need to reach out for C# code to do a task. I like X# and that fact that I can do everything I wish with it instead for having to mix my own DLLs.
The 'tee-shirt' comment is from a well know American / UK saying when a person is trying to show sympathy and understanding, and say that they also have done something similar. I think the full 'saying' is "been there, seen the film, got the tee-shirt".
I am looking forward to getting back into full-time X# coding this autumn and winter. I plan to do something very useful for guys coding in X# and using both XIDE and VS, and for guys using data in both DBFs as well as any SQL flavour. It will be a lot of work what I plan (details later) but first I must ask Meinhard if it may fit in with any plans he has for Cologne 2018. No point doing 5 months work if there is no room in the session plans for me ;-0)
Oh! and my plans have no WPF and XAML anywhere in sight ;-0)