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.
  • 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
                              • 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

                                realJSOPR Offline
                                realJSOPR Offline
                                realJSOP
                                wrote on last edited by
                                #23

                                A multiple choice question should not allow more than one correct answer unless the answers include the choices below: A) answer 1 B) answer 2 C) answer 3 D) All of the above E) None of the above F) The test is crap

                                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                -----
                                "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                N A 2 Replies Last reply
                                0
                                • A Andre xxxxxxx

                                  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 Offline
                                  P Offline
                                  Pete OHanlon
                                  wrote on last edited by
                                  #24

                                  Andre xxxxxxx wrote:

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

                                  Correct. The following class is perfectly legal:

                                  public abstract class MyClass
                                  {
                                  private int _myValue;
                                  public void SetMyValue(int myValue)
                                  {
                                  _myValue = myValue;
                                  }

                                  protected int MyValue
                                  {
                                  get { return _myValue; }
                                  }

                                  public abstract int GetMyValueAfterSomeOperation();
                                  }

                                  This would then be used as:

                                  public class MyMultClass
                                  {
                                  private int _myMult;
                                  public MyMultClass(int myMult)
                                  {
                                  _myMult = myMult;
                                  }

                                  public override int GetMyValueAfterSomeOperation()
                                  {
                                  return MyValue * _myMult;
                                  }
                                  }

                                  "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

                                  1 Reply Last reply
                                  0
                                  • realJSOPR realJSOP

                                    A multiple choice question should not allow more than one correct answer unless the answers include the choices below: A) answer 1 B) answer 2 C) answer 3 D) All of the above E) None of the above F) The test is crap

                                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                    -----
                                    "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

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

                                    Are you sure you didn't right this test ;) Honestly it begs that pople who create this shit are allow to type at the fucking keyboard.

                                    Software Kinetics (requires SL3 beta) - Moving software

                                    R 1 Reply Last reply
                                    0
                                    • realJSOPR realJSOP

                                      A multiple choice question should not allow more than one correct answer unless the answers include the choices below: A) answer 1 B) answer 2 C) answer 3 D) All of the above E) None of the above F) The test is crap

                                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                      -----
                                      "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

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

                                      John Simmons / outlaw programmer wrote:

                                      A) answer 1 B) answer 2 C) answer 3 D) All of the above E) None of the above F) (your answer) The test is crap - correct answer

                                      N 1 Reply Last reply
                                      0
                                      • A Andre xxxxxxx

                                        John Simmons / outlaw programmer wrote:

                                        A) answer 1 B) answer 2 C) answer 3 D) All of the above E) None of the above F) (your answer) The test is crap - correct answer

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

                                        Forgot to annotate it with FTFY

                                        Software Kinetics (requires SL3 beta) - Moving software

                                        1 Reply Last reply
                                        0
                                        • N NormDroid

                                          Are you sure you didn't right this test ;) Honestly it begs that pople who create this shit are allow to type at the fucking keyboard.

                                          Software Kinetics (requires SL3 beta) - Moving software

                                          R Offline
                                          R Offline
                                          Rob Graham
                                          wrote on last edited by
                                          #28

                                          Norm .net wrote:

                                          Honestly it begs that pople who create this sh*t are allow to type at the f***ing keyboard.

                                          They didn't. It was scrawled on a bar napkin and handed to a near illiterate secretary.

                                          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