Search:

Type: Posts; User: SearchingDataOnly

Page 1 of 13 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    16
    Views
    833

    Re: Some verbose C# code

    When I say cost, I mean: because c# requires explicit types, the code is full of a large number of type conversion functions, which makes the code bloated and verbose. This makes C# unable to be...
  2. Re: Pass empty-array to function parameters

    Your method works. Thank you, The trick.

    Currently, there are three solutions:

    (1) Use Variant instead of array

    (2) Preallocate global EmptyStringArray and EmptyParamModifierArray

    (3)...
  3. Re: Pass empty-array to function parameters

    Thank you, wqweto.

    For now, it seems to be the best way to preallocate global EmptyStringArray and EmptyParamModifierArray.
  4. Re: Pass empty-array to function parameters

    Yes, there are a lot of costs to using Variant, for example:

    (1) Use a longer variable name to describe the type of array elements in the Variant, for example: Modifiers_As_ParameterModifierArray...
  5. Re: Pass empty-array to function parameters

    Yes, Variant is an amazing thing. Maybe I can define function parameters like this:



    Public Function BindToMethod(ByVal BindingAttr As BindingFlags, _
    ...
  6. Replies
    16
    Views
    833

    Re: Some verbose C# code

    I'm thinking about the cost of explicit type and if there is a better solution than C# when it comes to type casting.

    Some people say that C# is the ceiling of object-oriented programming, but...
  7. Replies
    16
    Views
    833

    Re: Some verbose C# code

    I'm not trying to prove anything, just having some thoughts while reading the C# code, just wondering why it does it this way, or why it doesn't do it better?

    Whether I like C# or not, it's just a...
  8. Re: Pass empty-array to function parameters

    Thank you, wqweto.

    Yes, this is a viable approach and the one I'm currently using. But the problem is, I have hundreds of classes now, and may have thousands in the future, which means I need to...
  9. Replies
    16
    Views
    833

    Re: Some verbose C# code

    My sample code is from Reflection\CustomAttribute.cs in Microsoft .NET4.8
  10. Replies
    16
    Views
    833

    Re: Some verbose C# code

    I think a really concise and elegant language should look like this:

    C#


    private static RuntimeType Type_RuntimeType = typeof(RuntimeType);
    private static RuntimeType Type_Type =...
  11. Re: Pass empty-array to function parameters

    Thank you, Elroy.

    Yes, Variant is a valid solution, the disadvantage of this solution is that the specific data type of the array elements cannot be explicitly defined in the function parameter...
  12. [RESOLVED] Pass empty-array to function parameters

    In function parameters, sometimes there are array parameters of different data types. When calling these functions, sometimes we need to pass an empty-array to the functions, for example:


    ...
  13. Replies
    16
    Views
    833

    Some verbose C# code

    Some people say that C# code is very concise and elegant. But the ubiquitous "casting" in C# code makes C# code seem verbose and bloated.

    C#


    private static RuntimeType Type_RuntimeType =...
  14. Re: [RESOLVED] Is it worth buying vb6 cd is it expensive

    I've been reading a lot of C# and VB.NET code lately, and I don't think Microsoft's .NET designers understand the essence of Basic-Lang. This makes VB.NET unacceptable not only by VB6ers, but also by...
  15. Replies
    60
    Views
    2,185

    Re: .NET to VB6

    I'm sorry I didn't express my meaning clearly.

    What I want to say is that in the database field (or management software field), the need for class inheritance is very low, to be precise, the need...
  16. Replies
    60
    Views
    2,185

    Re: .NET to VB6

    VB6 has many advantages in the field of database operation. Olaf has done many demos in this thread and many others.

    If it were me, I would use my new VB6 code to access the database directly,...
  17. Replies
    60
    Views
    2,185

    Re: .NET to VB6

    My approach is to provide full implementations for interfaces through a "code generator", which is easy to implement in a transpiler.

    TypeScript allows to provide "dynamic interfaces" (optional...
  18. Replies
    60
    Views
    2,185

    Re: .NET to VB6

    Very good point of view, thank you, Olaf.
  19. Replies
    60
    Views
    2,185

    Re: .NET to VB6

    Yes, we sometimes need to give up something in the process of translation. For those syntactic features that cannot be translated I'll try to implement them in my transpilers, such as LINQ and XAML....
  20. Re: Why are some function names prefixed with the letter "n"?

    The sample code is from Microsoft's DotNet48ZDP\Source\ndp\clr\src\BCL\system\reflection\assembly.cs.

    Even in a giant company like Microsoft, some functions and variables are named very...
  21. Re: Why are some function names prefixed with the letter "n"?

    It's really weird if "n" stands for "new".
  22. Why are some function names prefixed with the letter "n"?

    I see some function names in Microsoft's codebases are prefixed with the letter "n" and I wonder why? Thanks!



    private static RuntimeAssembly nLoad(AssemblyName fileName,
    ...
  23. Replies
    60
    Views
    2,185

    Re: .NET to VB6

    @Arnoutdv, @PlausiblyDamp, @Niya, @peterst,

    The point I want to make is that translating mature libs in other programming languages into VB6 codebases is extremely interesting and extremely...
  24. Replies
    60
    Views
    2,185

    Re: .NET to VB6

    I still don't understand what you're trying to say. IMO, VB6 has been excellent (even unparalleled) in handling operations related to the database and the data layer, especially with the help of some...
  25. Replies
    60
    Views
    2,185

    Re: .NET to VB6

    VBCorLib is an awesome VB6 code library from which I learned a lot of useful stuff. But VBCorLib lacks three important class libs:

    (1) Drawing

    (2) WinForms (including Controls and UserControls)...
  26. Replies
    60
    Views
    2,185

    Re: .NET to VB6

    I'm thinking about a question: what if we use VB6 to emulate all the .NET Common-Controls, or use .NET to emulate VB6 Common-Controls?



    .NET just encapsulates API calls, and .NET provides a lot...
  27. Replies
    60
    Views
    2,185

    Re: .NET to VB6

    Nice sample code. If I want to use VB6 to implement the above code, my approach is to simulate .NET to write a System.ServiceProces lib (including ServiceBase class) and System.Threading lib.

    A...
  28. Replies
    60
    Views
    2,185

    Re: .NET to VB6

    Sorry, my question was not rigorous enough.
  29. Replies
    60
    Views
    2,185

    Re: .NET to VB6

    When I talk about .NET, it can be either C# or VB.NET, because almost all VB.NET code can be converted to C#, and 99% of C# code can be converted to VB.NET. So, either the C# example or the VB.NET...
  30. Re: Sinking TextBox events dynamically at runtime (IConnectionPoint::Advise) ?

    I guess Olaf might be able to provide a neat solution. There are several Event-related classes in RC6, but we don't know how to use them: cEventInfo, cEventCollection, cOOEventListener.
  31. Replies
    60
    Views
    2,185

    .NET to VB6

    This is a continuation of thread VB6 to .NET, but I'm more interested in ".NET to VB6"

    I'm thinking about a question: it's really difficult to convert VB6 to VB.NET, so, will it be less difficult...
  32. Re: Why are some dictionary variables prefixed with "cs"?

    Sorry for the late reply.

    It seems very reasonable that cs stands for "case-sensitive".

    Thank you to everyone involved in this thread. Thank you Niya, yereverluvinuncleber, peterst, wqweto,...
  33. Re: Why are some dictionary variables prefixed with "cs"?

    @Niya, @yereverluvinuncleber,

    It seems odd to interpret cs as "Coding Standards".

    Note:
    The code sample I posted is from Microsoft.
  34. [RESOLVED] Why are some dictionary variables prefixed with "cs"?

    I see some dictionary variables are prefixed with "cs", I'd like to know what does this "cs" stand for? Thanks !



    Dictionary<String, RuntimeEventInfo> csEventInfos;

    Dictionary<String,...
  35. Re: [RESOLVED] Why does C# allow direct access to private members of an object?

    Very nice and clear code. Thank you, szlamany.

    If 20 years ago, I knew that JavaScript could write such neat and clear code, maybe I started learning and using JavaScript 20 years ago. At that...
  36. Re: Could someone direct me to the Cairo Widgets Tut Re.......

    Many people have asked this question, and all I was able to do was copy-paste the previous answer again:



    Note:
    The ucPanel I am talking about is a VB6 custom user control with only a dozen...
  37. Re: Why does C# allow direct access to private members of an object?

    I didn't even know there was a C# sub-forum, I thought the C# question was merged into the VB.NET forum. :D



    Yes, I agree with that.

    I guess that VB6 uses dynamic compilation in the IDE...
  38. Re: Why does C# allow direct access to private members of an object?

    In VB6, the access rights of the member variables of the class should refer to "the access rights of the member variables of the instance of the class at runtime", not the access rights in the code...
  39. Re: Why does C# allow direct access to private members of an object?

    Thank you, OptionBase1.



    Thank you, jmcilhinney.

    Under normal circumstances, the access rights of the member variables of the class should refer to "the access rights of the member variables...
  40. Re: Some unreasonable restrictions in VB6

    Thank you, Niya. Yes, the C# approach is more convenient and flexible. But as in my reply above:

    Under normal circumstances, the access rights of the member variables of the class should refer to...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width