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
  1. Home
  2. The Lounge
  3. How C# are you? [modified]

How C# are you? [modified]

Scheduled Pinned Locked Moved The Lounge
csharpquestion
30 Posts 15 Posters 0 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.
  • V VE2

    C# quiz...:confused: http://www.ex-designz.net/test_page.asp?tid=48[^]

    73

    modified on Tuesday, July 7, 2009 7:49 AM

    P Offline
    P Offline
    Pete OHanlon
    wrote on last edited by
    #3

    Well "Find any errors in the following BankAccount constructor: Public int BankAccount() { balance = 0; } a) Name b) Formal parameters c) Return type - correct answer d) No errors " - it's public not Public.

    "WPF has many lovers. It's a veritable porn star!" - Josh Smith

    As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

    My blog | My articles | MoXAML PowerToys | Onyx

    C 1 Reply Last reply
    0
    • P Pete OHanlon

      Well "Find any errors in the following BankAccount constructor: Public int BankAccount() { balance = 0; } a) Name b) Formal parameters c) Return type - correct answer d) No errors " - it's public not Public.

      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

      My blog | My articles | MoXAML PowerToys | Onyx

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

      I had stopped reading in disgust long before that....

      Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

      1 Reply Last reply
      0
      • V VE2

        C# quiz...:confused: http://www.ex-designz.net/test_page.asp?tid=48[^]

        73

        modified on Tuesday, July 7, 2009 7:49 AM

        M Offline
        M Offline
        Michael Bookatz
        wrote on last edited by
        #5

        I was in too much pain after reading the first 18 questions and couldn't carry on.

        H 1 Reply Last reply
        0
        • V VE2

          C# quiz...:confused: http://www.ex-designz.net/test_page.asp?tid=48[^]

          73

          modified on Tuesday, July 7, 2009 7:49 AM

          H Offline
          H Offline
          himanshu2561
          wrote on last edited by
          #6

          The ThreadPriority enumeration does not contain: a) Lowest b) Highest c) BelowNormal d) None of the above - correct answer :((

          himanshu

          P 1 Reply Last reply
          0
          • M Michael Bookatz

            I was in too much pain after reading the first 18 questions and couldn't carry on.

            H Offline
            H Offline
            Henry Minute
            wrote on last edited by
            #7

            hopingToCode wrote:

            I was in too much pain after reading the first 18 questions

            I think that effort must put you close to the top of the high-scores table.

            Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

            1 Reply Last reply
            0
            • H himanshu2561

              The ThreadPriority enumeration does not contain: a) Lowest b) Highest c) BelowNormal d) None of the above - correct answer :((

              himanshu

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #8

              Wow - you got even further than me before giving up the will to live.

              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

              My blog | My articles | MoXAML PowerToys | Onyx

              H 1 Reply Last reply
              0
              • P Pete OHanlon

                Wow - you got even further than me before giving up the will to live.

                "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                My blog | My articles | MoXAML PowerToys | Onyx

                H Offline
                H Offline
                himanshu2561
                wrote on last edited by
                #9

                After reading your post i started from bottom but stupidness extends till the bottom hole.

                himanshu

                1 Reply Last reply
                0
                • V VE2

                  C# quiz...:confused: http://www.ex-designz.net/test_page.asp?tid=48[^]

                  73

                  modified on Tuesday, July 7, 2009 7:49 AM

                  A Offline
                  A Offline
                  Andre xxxxxxx
                  wrote on last edited by
                  #10

                  Synchronization is: a) the delaying of a thread until there is sufficient memory and work to keep it up b) making every thread start and end at the same time c) make each thread do the same thing d) have each thread start at the same time but not necessarily finish together b,c and d are utterly BS, but I also don't want to click on a :sigh:

                  1 Reply Last reply
                  0
                  • V VE2

                    C# quiz...:confused: http://www.ex-designz.net/test_page.asp?tid=48[^]

                    73

                    modified on Tuesday, July 7, 2009 7:49 AM

                    A Offline
                    A Offline
                    Andre xxxxxxx
                    wrote on last edited by
                    #11

                    a) True - correct answer b) (your answer) False I've only used C++/CLI and if I declare a method as abstract and omit the abstract keyword behind the class I get a warning, but I can also declare a class as abstract without even any abstract methods. Is this not true for C#?

                    L P 2 Replies Last reply
                    0
                    • V VE2

                      C# quiz...:confused: http://www.ex-designz.net/test_page.asp?tid=48[^]

                      73

                      modified on Tuesday, July 7, 2009 7:49 AM

                      R Offline
                      R Offline
                      Rage
                      wrote on last edited by
                      #12
                      1. Synchronization is: a) the delaying of a thread until there is sufficient memory and work to keep it up - correct answer :confused: :omg:
                      1 Reply Last reply
                      0
                      • V VE2

                        C# quiz...:confused: http://www.ex-designz.net/test_page.asp?tid=48[^]

                        73

                        modified on Tuesday, July 7, 2009 7:49 AM

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #13

                        Wowowow :omg: Just some of the mistakes: (disclaimer: I just woke up so I may have seen mistakes where there are none) 11) String mystring; Creates a(n) e) depending on the context it may define a private field or reserve a local slot. 12) An Event is d) a collection of delegates which you may add or remove that you (not the user) can invoke all at once 14) should be a. It's possible, not always - but still possible 16) What is the proper header for a class that intends to use an interface. f) none, there are no headers in C#. 17) "create an interface objects" and what is that supposed to mean? It doesn't even look like correct English to me. 20) Polymorphism occurs when the methods of the child class. e) nothing. It occurs when you have a child class. 21) To output the value of multidimensional array, Console.WriteLines(___) e) myArray[1,3] because the thing at A is a jagged array, not a multidimensional one. 22) All methods in an abstract base class must be declared abstract. It's b. Unless that makes it "just an abstract class" instead of an "abstract base class". But it's silly to call it "base" anyway - it's not required that you derive from it somewhere. 27) A method_____an exception when that method detects that a problem has occured. e) does whatever it bloody wants. Maybe it pretends nothing happened, or it returns -1, or an error code, or calls Environment.Exit() or maybe it blows up the universe. 30) A____block enclose the code that could throw an exception. f) scope. You don't have to catch it, but it will at least have a scope block around it. 32) answer A is slightly.. odd.. but the "and work" makes it technically true. 37) In order to lock/unlock an object use the. e) please use the lock keyword (but B would work..)

                        1 Reply Last reply
                        0
                        • A Andre xxxxxxx

                          a) True - correct answer b) (your answer) False I've only used C++/CLI and if I declare a method as abstract and omit the abstract keyword behind the class I get a warning, but I can also declare a class as abstract without even any abstract methods. Is this not true for C#?

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #14

                          You don't even get a warning.

                          1 Reply Last reply
                          0
                          • V VE2

                            C# quiz...:confused: http://www.ex-designz.net/test_page.asp?tid=48[^]

                            73

                            modified on Tuesday, July 7, 2009 7:49 AM

                            A Offline
                            A Offline
                            Andre xxxxxxx
                            wrote on last edited by
                            #15

                            I've choosen a) because ToLower() returns a copy of the string X| a) (your answer) String = string.ToLower(string); b) ToLower(string); c) string.ToLower(); - correct answer d) string.ToLower(string);

                            M 1 Reply Last reply
                            0
                            • A Andre xxxxxxx

                              I've choosen a) because ToLower() returns a copy of the string X| a) (your answer) String = string.ToLower(string); b) ToLower(string); c) string.ToLower(); - correct answer d) string.ToLower(string);

                              M Offline
                              M Offline
                              molesworth
                              wrote on last edited by
                              #16

                              The correct answer is "none of the above". Normally, I'd use newstring = oldstring.ToLower(); The optional parameter is a CultureInfo string, if you want formatting for a particular culture setting. However, using "String" or "string" as variable names is going to throw up compile errors. PS - that quiz is an abomination which should be removed before anybody gets the wrong impression of C# :)

                              There are three kinds of people in the world - those who can count and those who can't...

                              A 1 Reply Last reply
                              0
                              • A Andre xxxxxxx

                                a) True - correct answer b) (your answer) False I've only used C++/CLI and if I declare a method as abstract and omit the abstract keyword behind the class I get a warning, but I can also declare a class as abstract without even any abstract methods. Is this not true for C#?

                                P Offline
                                P Offline
                                Pete OHanlon
                                wrote on last edited by
                                #17

                                All methods in an abstract base class do not have to be declared abstract. You can't instantiate an abstract base class, but you can provide default functionality. What you must do, is provide an implementation of abstract functionality in any derived classes. You, also, can't declare a method as abstract if it's not in an abstract class. Honestly, this test is rubbish.

                                "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                                As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                                My blog | My articles | MoXAML PowerToys | Onyx

                                A 1 Reply Last reply
                                0
                                • M molesworth

                                  The correct answer is "none of the above". Normally, I'd use newstring = oldstring.ToLower(); The optional parameter is a CultureInfo string, if you want formatting for a particular culture setting. However, using "String" or "string" as variable names is going to throw up compile errors. PS - that quiz is an abomination which should be removed before anybody gets the wrong impression of C# :)

                                  There are three kinds of people in the world - those who can count and those who can't...

                                  A Offline
                                  A Offline
                                  Andre xxxxxxx
                                  wrote on last edited by
                                  #18

                                  molesworth wrote:

                                  However, using "String" or "string" as variable names is going to throw up compile errors.

                                  I know, but I thought the questioner wanted to see if we know that ToLower() returns a copy, but obviously that was not his intention X|

                                  M 1 Reply Last reply
                                  0
                                  • V VE2

                                    C# quiz...:confused: http://www.ex-designz.net/test_page.asp?tid=48[^]

                                    73

                                    modified on Tuesday, July 7, 2009 7:49 AM

                                    H Offline
                                    H Offline
                                    hairy_hats
                                    wrote on last edited by
                                    #19

                                    "70% = C" I wish that GCSEs were graded on that scale. Seems to me you only need to turn up to get a C.

                                    I hope you realise that hamsters are very creative when it comes to revenge. - Elaine

                                    0 1 Reply Last reply
                                    0
                                    • P Pete OHanlon

                                      All methods in an abstract base class do not have to be declared abstract. You can't instantiate an abstract base class, but you can provide default functionality. What you must do, is provide an implementation of abstract functionality in any derived classes. You, also, can't declare a method as abstract if it's not in an abstract class. Honestly, this test is rubbish.

                                      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                                      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                                      My blog | My articles | MoXAML PowerToys | Onyx

                                      A Offline
                                      A Offline
                                      Andre xxxxxxx
                                      wrote on last edited by
                                      #20

                                      Pete O'Hanlon wrote:

                                      You, also, can't declare a method as abstract if it's not in an abstract class.

                                      Ok, so Harold was wrong with his answer. In C++/CLI

                                      ref class A
                                      {
                                      virtual foo() = 0;
                                      };

                                      gives a warning because of the missing abstract behind the class. But in C++ you can also provide a default implementation of a method AND declare it as abstract (pure virtual).

                                      class A
                                      {
                                      virtual foo() = 0
                                      {
                                      doSomething();
                                      }
                                      }

                                      If C# does not force me to declare every method as abstract, the test is wrong here again.

                                      P 1 Reply Last reply
                                      0
                                      • V VE2

                                        C# quiz...:confused: http://www.ex-designz.net/test_page.asp?tid=48[^]

                                        73

                                        modified on Tuesday, July 7, 2009 7:49 AM

                                        N Offline
                                        N Offline
                                        NormDroid
                                        wrote on last edited by
                                        #21

                                        Most ambiguous set of questions I have ever to set my poor eyes on.

                                        Software Kinetics (requires SL3 beta) - Moving software

                                        1 Reply Last reply
                                        0
                                        • A Andre xxxxxxx

                                          molesworth wrote:

                                          However, using "String" or "string" as variable names is going to throw up compile errors.

                                          I know, but I thought the questioner wanted to see if we know that ToLower() returns a copy, but obviously that was not his intention X|

                                          M Offline
                                          M Offline
                                          molesworth
                                          wrote on last edited by
                                          #22

                                          I'm not sure what his intention was. To confuse and babmoozle perhaps? :)

                                          There are three kinds of people in the world - those who can count and those who can't...

                                          1 Reply 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