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. Other Discussions
  3. The Weird and The Wonderful
  4. Ah the joys of working in a team

Ah the joys of working in a team

Scheduled Pinned Locked Moved The Weird and The Wonderful
c++csharprubycollaboration
7 Posts 5 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.
  • A Offline
    A Offline
    Argonia
    wrote on last edited by
    #1

    After long though i decided to share this wonderful gem in c# Today cannot get "better".

        /// Get value that corresponds to menu name or menu id.
        ///  Menu name. 
        ///  Menu id. 
        /// enum value. 
        public enumType GetValueByInfo(string name, string id)
        {
            enumType result = enumDictionary\[id\];
            return result;
        }
    

    And the enumDictionary is just declared Dictionary with (string, enumType) pairs The names are changed. This beautiful thing is written in c# from someone else than me, a colleague who worked longer than me in the firm. He is working mainly with c# projects i am working mainly with vc++ and MFC(oh the joy) When i have to change something my boss always says to me to write it in the same manner like the things are done in the project. The worst part is this gem is written in my dll (the dll i should be working but all other are adding things but me) I hate when someone else is touching my code.

    Microsoft ... the only place where VARIANT_TRUE != true

    J R 2 Replies Last reply
    0
    • A Argonia

      After long though i decided to share this wonderful gem in c# Today cannot get "better".

          /// Get value that corresponds to menu name or menu id.
          ///  Menu name. 
          ///  Menu id. 
          /// enum value. 
          public enumType GetValueByInfo(string name, string id)
          {
              enumType result = enumDictionary\[id\];
              return result;
          }
      

      And the enumDictionary is just declared Dictionary with (string, enumType) pairs The names are changed. This beautiful thing is written in c# from someone else than me, a colleague who worked longer than me in the firm. He is working mainly with c# projects i am working mainly with vc++ and MFC(oh the joy) When i have to change something my boss always says to me to write it in the same manner like the things are done in the project. The worst part is this gem is written in my dll (the dll i should be working but all other are adding things but me) I hate when someone else is touching my code.

      Microsoft ... the only place where VARIANT_TRUE != true

      J Offline
      J Offline
      JMK89
      wrote on last edited by
      #2

      haha awesome! I would be interested to see, in the places where this is being called, the variety of values being supplied for name.

      Well fads they come and fads they go. And God I love that rock and roll! Well the point was fast but it was too blunt to miss. Life handed us a paycheck, we said, "We worked harder than this!"

      A 1 Reply Last reply
      0
      • J JMK89

        haha awesome! I would be interested to see, in the places where this is being called, the variety of values being supplied for name.

        Well fads they come and fads they go. And God I love that rock and roll! Well the point was fast but it was too blunt to miss. Life handed us a paycheck, we said, "We worked harder than this!"

        A Offline
        A Offline
        Argonia
        wrote on last edited by
        #3

        I would like to see this working with a string which is not set as key in the dictionary. :laugh:

        Microsoft ... the only place where VARIANT_TRUE != true

        F 1 Reply Last reply
        0
        • A Argonia

          After long though i decided to share this wonderful gem in c# Today cannot get "better".

              /// Get value that corresponds to menu name or menu id.
              ///  Menu name. 
              ///  Menu id. 
              /// enum value. 
              public enumType GetValueByInfo(string name, string id)
              {
                  enumType result = enumDictionary\[id\];
                  return result;
              }
          

          And the enumDictionary is just declared Dictionary with (string, enumType) pairs The names are changed. This beautiful thing is written in c# from someone else than me, a colleague who worked longer than me in the firm. He is working mainly with c# projects i am working mainly with vc++ and MFC(oh the joy) When i have to change something my boss always says to me to write it in the same manner like the things are done in the project. The worst part is this gem is written in my dll (the dll i should be working but all other are adding things but me) I hate when someone else is touching my code.

          Microsoft ... the only place where VARIANT_TRUE != true

          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #4

          Time to institute code reviews. :) /ravi

          My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

          L 1 Reply Last reply
          0
          • R Ravi Bhavnani

            Time to institute code reviews. :) /ravi

            My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

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

            Ravi Bhavnani wrote:

            Time to institute code reviews hire good programmers.

            FTFY :-)

            R 1 Reply Last reply
            0
            • L Lost User

              Ravi Bhavnani wrote:

              Time to institute code reviews hire good programmers.

              FTFY :-)

              R Offline
              R Offline
              Ravi Bhavnani
              wrote on last edited by
              #6

              :thumbsup: /ravi

              My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

              1 Reply Last reply
              0
              • A Argonia

                I would like to see this working with a string which is not set as key in the dictionary. :laugh:

                Microsoft ... the only place where VARIANT_TRUE != true

                F Offline
                F Offline
                Freak30
                wrote on last edited by
                #7

                Just supplying the correct name and an empty id string should do the trick. ;)

                The good thing about pessimism is, that you are always either right or pleasently surprised.

                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