Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. The Lounge
  3. Argh - C# can really SUCK !!!!

Argh - C# can really SUCK !!!!

Scheduled Pinned Locked Moved The Lounge
csharpxml
59 Posts 16 Posters 9 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Christian Graus

    For those who don't know, in C# you can declare a parameter to be a reference with ref or out, the difference is a ref must already exist, and an out must be assigned a value by the function taking the parameter. I have a method which returns a bool for success or failure, and takes an XPath and an int, the int gets populated with the value of the XPath. The XPath is turned into a node calling an internal function called 'FindNode'. Here's the rub. If I make the int a ref, it won't compile unless I give it an initial value. If I make it an out, I can't compile at all, because I call an external function within my function. I need to give i a default value within my function, just to make it compile..... Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

    T Offline
    T Offline
    Tomasz Sowinski
    wrote on last edited by
    #2

    Christian Graus wrote: If I make it an out, I can't compile at all, because I call an external function within my function I don't get this 'external' part. Can you elaborate? Tomasz Sowinski -- http://www.shooltz.com

    *** Vodka. Connecting people. ***

    C K 2 Replies Last reply
    0
    • C Christian Graus

      For those who don't know, in C# you can declare a parameter to be a reference with ref or out, the difference is a ref must already exist, and an out must be assigned a value by the function taking the parameter. I have a method which returns a bool for success or failure, and takes an XPath and an int, the int gets populated with the value of the XPath. The XPath is turned into a node calling an internal function called 'FindNode'. Here's the rub. If I make the int a ref, it won't compile unless I give it an initial value. If I make it an out, I can't compile at all, because I call an external function within my function. I need to give i a default value within my function, just to make it compile..... Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

      G Offline
      G Offline
      George
      wrote on last edited by
      #3

      Christian Graus wrote: Argh - C# can really SUCK !!!! Then why are you wasting your time with it? :confused:

      /* I C++, therefore I am... */

      C 1 Reply Last reply
      0
      • T Tomasz Sowinski

        Christian Graus wrote: If I make it an out, I can't compile at all, because I call an external function within my function I don't get this 'external' part. Can you elaborate? Tomasz Sowinski -- http://www.shooltz.com

        *** Vodka. Connecting people. ***

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #4

        You're right - I meant internal. I call another function within my class. Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

        T 1 Reply Last reply
        0
        • G George

          Christian Graus wrote: Argh - C# can really SUCK !!!! Then why are you wasting your time with it? :confused:

          /* I C++, therefore I am... */

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #5

          Because asp.net absolutely leaves 'classic' asp for dead. It's the .net 'killer app'. And the odds of be using VB EVER are zero. Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

          C G 2 Replies Last reply
          0
          • C Christian Graus

            Because asp.net absolutely leaves 'classic' asp for dead. It's the .net 'killer app'. And the odds of be using VB EVER are zero. Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

            C Offline
            C Offline
            Christopher Duncan
            wrote on last edited by
            #6

            I still haven't bought vs.net yet. Probably get around to it eventually, but I was wondering... I do my asp development with just my programmer's editor & an ftp client. Can you do asp.net development the same way, or is it too painful without the vs.net environment? Chistopher Duncan Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)

            D 1 Reply Last reply
            0
            • C Christian Graus

              Because asp.net absolutely leaves 'classic' asp for dead. It's the .net 'killer app'. And the odds of be using VB EVER are zero. Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

              G Offline
              G Offline
              George
              wrote on last edited by
              #7

              Christian Graus wrote: Because asp.net absolutely leaves 'classic' asp for dead. It's the .net 'killer app'. And the odds of be using VB EVER are zero. Why don't you use C++ (or MC++ for that matter) if you need something that works with asp.net instead of C#? I thought that was the whole point of MC++? And by the way - why are you wasting your time with asp as well? ;)

              /* I C++, therefore I am... */

              T C C 3 Replies Last reply
              0
              • C Christian Graus

                You're right - I meant internal. I call another function within my class. Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

                T Offline
                T Offline
                Tomasz Sowinski
                wrote on last edited by
                #8

                I still don't understand :) You mean that out parameters can't be used in functions which call other functions?? Tomasz Sowinski -- http://www.shooltz.com

                *** Vodka. Connecting people. ***

                C 1 Reply Last reply
                0
                • G George

                  Christian Graus wrote: Because asp.net absolutely leaves 'classic' asp for dead. It's the .net 'killer app'. And the odds of be using VB EVER are zero. Why don't you use C++ (or MC++ for that matter) if you need something that works with asp.net instead of C#? I thought that was the whole point of MC++? And by the way - why are you wasting your time with asp as well? ;)

                  /* I C++, therefore I am... */

                  T Offline
                  T Offline
                  Tomasz Sowinski
                  wrote on last edited by
                  #9

                  Because you can't design pages visually with MC++. MC++ is here mostly for interop. Tomasz Sowinski -- http://www.shooltz.com

                  *** Vodka. Connecting people. ***

                  G 1 Reply Last reply
                  0
                  • C Christian Graus

                    For those who don't know, in C# you can declare a parameter to be a reference with ref or out, the difference is a ref must already exist, and an out must be assigned a value by the function taking the parameter. I have a method which returns a bool for success or failure, and takes an XPath and an int, the int gets populated with the value of the XPath. The XPath is turned into a node calling an internal function called 'FindNode'. Here's the rub. If I make the int a ref, it won't compile unless I give it an initial value. If I make it an out, I can't compile at all, because I call an external function within my function. I need to give i a default value within my function, just to make it compile..... Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

                    S Offline
                    S Offline
                    Senkwe Chanda
                    wrote on last edited by
                    #10

                    Hmmm, I'm not sure I understand (maybe we need to see some code first). All I know is that to pass an argument to a ref parameter, you have to initialize it first. At least thats the way I read the C# Reference on the topic. ASP.NET can never fail as working with it is like fitting bras to supermodels - it's one pleasure after the next - David Wulff

                    C 1 Reply Last reply
                    0
                    • C Christian Graus

                      For those who don't know, in C# you can declare a parameter to be a reference with ref or out, the difference is a ref must already exist, and an out must be assigned a value by the function taking the parameter. I have a method which returns a bool for success or failure, and takes an XPath and an int, the int gets populated with the value of the XPath. The XPath is turned into a node calling an internal function called 'FindNode'. Here's the rub. If I make the int a ref, it won't compile unless I give it an initial value. If I make it an out, I can't compile at all, because I call an external function within my function. I need to give i a default value within my function, just to make it compile..... Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

                      S Offline
                      S Offline
                      Shaun Wilde
                      wrote on last edited by
                      #11

                      Off topic - but what do you recommend - SVG or VML? Can svg do inline like you can vml or do you always have to get the .svg as an image? thanks

                      Stupidity dies. The end of future offspring. Evolution wins. - A Darwin Awards Haiku

                      P 1 Reply Last reply
                      0
                      • T Tomasz Sowinski

                        Because you can't design pages visually with MC++. MC++ is here mostly for interop. Tomasz Sowinski -- http://www.shooltz.com

                        *** Vodka. Connecting people. ***

                        G Offline
                        G Offline
                        George
                        wrote on last edited by
                        #12

                        Tomasz Sowinski wrote: Because you can't design pages visually with MC++. That's what you get for using the beta-quality product which is what VS.NET is. :laugh: Tomasz Sowinski wrote: MC++ is here mostly for interop. I think it's rather to "embrace and extend".

                        /* I C++, therefore I am... */

                        T 1 Reply Last reply
                        0
                        • G George

                          Tomasz Sowinski wrote: Because you can't design pages visually with MC++. That's what you get for using the beta-quality product which is what VS.NET is. :laugh: Tomasz Sowinski wrote: MC++ is here mostly for interop. I think it's rather to "embrace and extend".

                          /* I C++, therefore I am... */

                          T Offline
                          T Offline
                          Tomasz Sowinski
                          wrote on last edited by
                          #13

                          George wrote: That's what you get for using the beta-quality product which is what VS.NET is Regardless of quality, you'd have to be masochist to use MC++ for ASP.NET, even if there would be no VS issues. George wrote: I think it's rather to "embrace and extend". To embrace what? Tomasz Sowinski -- http://www.shooltz.com

                          *** Vodka. Connecting people. ***

                          G 1 Reply Last reply
                          0
                          • S Shaun Wilde

                            Off topic - but what do you recommend - SVG or VML? Can svg do inline like you can vml or do you always have to get the .svg as an image? thanks

                            Stupidity dies. The end of future offspring. Evolution wins. - A Darwin Awards Haiku

                            P Offline
                            P Offline
                            Paul Watson
                            wrote on last edited by
                            #14

                            Shaun Wilde wrote: but what do you recommend - SVG or VML? SVG. It is a standard, it is fully XML, it is pretty cool. Shaun Wilde wrote: Can svg do inline like you can vml or do you always have to get the .svg as an image? http://www.protocol7.com/svg-wiki/default.asp?InlineExamples[^]

                            Paul Watson
                            Bluegrass
                            Cape Town, South Africa

                            S 1 Reply Last reply
                            0
                            • C Christian Graus

                              For those who don't know, in C# you can declare a parameter to be a reference with ref or out, the difference is a ref must already exist, and an out must be assigned a value by the function taking the parameter. I have a method which returns a bool for success or failure, and takes an XPath and an int, the int gets populated with the value of the XPath. The XPath is turned into a node calling an internal function called 'FindNode'. Here's the rub. If I make the int a ref, it won't compile unless I give it an initial value. If I make it an out, I can't compile at all, because I call an external function within my function. I need to give i a default value within my function, just to make it compile..... Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

                              D Offline
                              D Offline
                              Daniel Turini
                              wrote on last edited by
                              #15

                              Christian Graus wrote: I have a method which returns a bool for success or failure, and takes an XPath and an int, the int gets populated with the value of the XPath. The XPath is turned into a node calling an internal function called 'FindNode'. Here's the rub. If I make the int a ref, it won't compile unless I give it an initial value. If I make it an out, I can't compile at all, because I call an external function within my function. I need to give i a default value within my function, just to make it compile..... It's more probable there's a mistake in your design. Think the 'out' attribute on a parameter the same as the const-ness of a C++ variable. You shouldn't cast-out a const to a non-const. Probably you are passing the out parameter to a function as a non-out parameter. This is a no-no. "In an organization, each person rises to the level of his own incompetence." Peter's Principle

                              C 1 Reply Last reply
                              0
                              • T Tomasz Sowinski

                                George wrote: That's what you get for using the beta-quality product which is what VS.NET is Regardless of quality, you'd have to be masochist to use MC++ for ASP.NET, even if there would be no VS issues. George wrote: I think it's rather to "embrace and extend". To embrace what? Tomasz Sowinski -- http://www.shooltz.com

                                *** Vodka. Connecting people. ***

                                G Offline
                                G Offline
                                George
                                wrote on last edited by
                                #16

                                Tomasz Sowinski wrote: Regardless of quality, you'd have to be masochist to use MC++ for ASP.NET, even if there would be no VS issues. You are already a masochist to work with ASP or ASP.NET or C#. Why not make a one more step? ;) Tomasz Sowinski wrote: To embrace what? C++. Why else there would be all that commotion around C++ compliance (aka embrace) and garbage collection ("extend") in Microsoft? The lack of certain ("visual") features specifically in C++ part of VS.NET gives it out clearly. The "new" IDE that looks just like the good old Visual Interdev or Visual Basic gives another clue. VS.NET IDE sucks for C++ development. They tried the same trick with Netscape and Java, it might be worth to try with C++. Just think about it...

                                /* I C++, therefore I am... */

                                T W 2 Replies Last reply
                                0
                                • C Christopher Duncan

                                  I still haven't bought vs.net yet. Probably get around to it eventually, but I was wondering... I do my asp development with just my programmer's editor & an ftp client. Can you do asp.net development the same way, or is it too painful without the vs.net environment? Chistopher Duncan Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)

                                  D Offline
                                  D Offline
                                  David Stone
                                  wrote on last edited by
                                  #17

                                  Oh it's very painful. If you're going to go the Notepad.NET route, then I would suggest hopping over to www.asp.net[^] and getting WebMatrix. It's the free ASP.NET editor that the ASP.NET team put together on their free time... Norm Almond: I seen some GUI's in my life but WTF is this mess ;-) Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough:) Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children:laugh: Leppie:My sister is 25:eek: -Norm on the MailMagic GUI

                                  1 Reply Last reply
                                  0
                                  • T Tomasz Sowinski

                                    Christian Graus wrote: If I make it an out, I can't compile at all, because I call an external function within my function I don't get this 'external' part. Can you elaborate? Tomasz Sowinski -- http://www.shooltz.com

                                    *** Vodka. Connecting people. ***

                                    K Offline
                                    K Offline
                                    KaRl
                                    wrote on last edited by
                                    #18

                                    Tomasz Sowinski wrote: *** Vodka. Connecting people. *** Pursuing the polish dream... ;) So I came to find To end up this way Feeling like I'm God Feeling there's no way KoRn, "No Way"

                                    1 Reply Last reply
                                    0
                                    • G George

                                      Tomasz Sowinski wrote: Regardless of quality, you'd have to be masochist to use MC++ for ASP.NET, even if there would be no VS issues. You are already a masochist to work with ASP or ASP.NET or C#. Why not make a one more step? ;) Tomasz Sowinski wrote: To embrace what? C++. Why else there would be all that commotion around C++ compliance (aka embrace) and garbage collection ("extend") in Microsoft? The lack of certain ("visual") features specifically in C++ part of VS.NET gives it out clearly. The "new" IDE that looks just like the good old Visual Interdev or Visual Basic gives another clue. VS.NET IDE sucks for C++ development. They tried the same trick with Netscape and Java, it might be worth to try with C++. Just think about it...

                                      /* I C++, therefore I am... */

                                      T Offline
                                      T Offline
                                      Tomasz Sowinski
                                      wrote on last edited by
                                      #19

                                      George wrote: You are already a masochist to work with ASP or ASP.NET or C#. Why not make a one more step? Why do I have a feeling that you don't have a clue what you're talking about? Never mind. What would you suggest for non-masochistic web application development? George wrote: They tried the same trick with Netscape and Java, it might be worth to try with C++. Well, actually they provided nice extensions to Java and better browser than Netscape. With MC++ there's not much worth investigating if you don't plan to reuse your C++ code. Tomasz Sowinski -- http://www.shooltz.com

                                      *** Vodka. Connecting people. ***

                                      G 1 Reply Last reply
                                      0
                                      • P Paul Watson

                                        Shaun Wilde wrote: but what do you recommend - SVG or VML? SVG. It is a standard, it is fully XML, it is pretty cool. Shaun Wilde wrote: Can svg do inline like you can vml or do you always have to get the .svg as an image? http://www.protocol7.com/svg-wiki/default.asp?InlineExamples[^]

                                        Paul Watson
                                        Bluegrass
                                        Cape Town, South Africa

                                        S Offline
                                        S Offline
                                        Shaun Wilde
                                        wrote on last edited by
                                        #20

                                        thanks - I was swaying towards VML as it is for IE only and I could find loads of examples on inline VML (even here on codetools) but nothing on SVG. but I think your right it is better to stick with a standard.

                                        Stupidity dies. The end of future offspring. Evolution wins. - A Darwin Awards Haiku

                                        P 1 Reply Last reply
                                        0
                                        • T Tomasz Sowinski

                                          George wrote: You are already a masochist to work with ASP or ASP.NET or C#. Why not make a one more step? Why do I have a feeling that you don't have a clue what you're talking about? Never mind. What would you suggest for non-masochistic web application development? George wrote: They tried the same trick with Netscape and Java, it might be worth to try with C++. Well, actually they provided nice extensions to Java and better browser than Netscape. With MC++ there's not much worth investigating if you don't plan to reuse your C++ code. Tomasz Sowinski -- http://www.shooltz.com

                                          *** Vodka. Connecting people. ***

                                          G Offline
                                          G Offline
                                          George
                                          wrote on last edited by
                                          #21

                                          Tomasz Sowinski wrote: Why do I have a feeling that you don't have a clue what you're talking about? Because you don't know me? ;P Tomasz Sowinski wrote: What would you suggest for non-masochistic web application development? First of all I would suggest to avoid the web application development itself. Failing that, use C++. For example in my current job we have a nice ActiveX stuffed on the webpage that effectively is a web application. It's all in C++ and we have only about 10kB of the HTML/asp code to wrap that ActiveX all together. You get the power of C++ with all the goodies of web, like easy deployment or database access. What you don't get is the typical "web application crap", like asp pages. I've been actually porting some old asp code to that ActiveX architecture, and I can tell that asp really sucks and I don't see ASP.NET or C# being any better. Generally it all depends on the life expectancy of your application. If it's supposed to be used for a week or two use C#, VB, ASP or whatever. But for the long run you need a serious tool that allows you to get the job done properly and that tools often turns to be C++. Tomasz Sowinski wrote: Well, actually they provided nice extensions to Java and better browser than Netscape. "Nice" is a very relative term. Browser from Microsoft is not better, it's rather the Netscape was worse - they clearly dropped the ball at some point. Tomasz Sowinski wrote: With MC++ there's not much worth investigating if you don't plan to reuse your C++ code. I am not sure what are you trying to say here. But I find latest Herb's comments that MC++ and C++ Standard have the same goals very fit to my theory. Let's hope I am wrong on that one...

                                          /* I C++, therefore I am... */

                                          T C 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups