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. General Programming
  3. C#
  4. C# features

C# features

Scheduled Pinned Locked Moved C#
questioncsharpc++code-reviewlearning
21 Posts 6 Posters 5 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 Calin Negru

    I’m writing my main project in c++ but in order to get better at c++ I need to improve my c# skills. My question is what should a person learn after getting comfortable with variables, lists and classes in C#. I remember seeing helper constructs that make certain operations when dealing with lists easier but at that time I could not understand them. What would be your recommendation for let’s say top four things to know after learning the basics in C#?

    P Offline
    P Offline
    PIEBALDconsult
    wrote on last edited by
    #2

    I doubt that learning C# can help with learning C++.

    C 1 Reply Last reply
    0
    • P PIEBALDconsult

      I doubt that learning C# can help with learning C++.

      C Offline
      C Offline
      Calin Negru
      wrote on last edited by
      #3

      With c# you learn about the type of problems a programmer has to deal with and an easy and friendly way to solve them. I had been alternating from one language to the other since I started programming, this is how I got better at c++. At the end of the day why I want to improve my c# skills doesn’t matter

      1 Reply Last reply
      0
      • C Calin Negru

        I’m writing my main project in c++ but in order to get better at c++ I need to improve my c# skills. My question is what should a person learn after getting comfortable with variables, lists and classes in C#. I remember seeing helper constructs that make certain operations when dealing with lists easier but at that time I could not understand them. What would be your recommendation for let’s say top four things to know after learning the basics in C#?

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #4

        If you want to improve your C# skills then randomly asking "what should I learn next" isn't the best way: there is just too much stuff in there. At it's heart, C# is a pretty simple language, but it's tightly integrated with the .NET framework which is frankly enormous. While variables and classes are part of C#, Lists and such like aren't - they are part of the framework. And while C# and C++ look pretty similar they really aren't, they are very different languages, which can use the same framework but don't have to - C++ doesn't need to use .NET at all! So "learning C# to get better at C++" isn't really a brilliant idea because you are learning stuff that isn't relevant and may not be transferable. It may be easier to learn how to think like a developer in C# because it's a lot more forgiving and the .NET framework adds a hugely rich set of support classes but learning specific features isn't the way to do it as they are probably not transferable to "vanilla" C++ What I'd suggest is this: if you want to learn a language then go on a course, or get a book and learn that language. Don't try to learn "X" in the hope it'll make "Y" work as well because it won't - like learning to fly a drone won't teach you to fly a helicopter! That applies to C# and C++.

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        C P 2 Replies Last reply
        0
        • OriginalGriffO OriginalGriff

          If you want to improve your C# skills then randomly asking "what should I learn next" isn't the best way: there is just too much stuff in there. At it's heart, C# is a pretty simple language, but it's tightly integrated with the .NET framework which is frankly enormous. While variables and classes are part of C#, Lists and such like aren't - they are part of the framework. And while C# and C++ look pretty similar they really aren't, they are very different languages, which can use the same framework but don't have to - C++ doesn't need to use .NET at all! So "learning C# to get better at C++" isn't really a brilliant idea because you are learning stuff that isn't relevant and may not be transferable. It may be easier to learn how to think like a developer in C# because it's a lot more forgiving and the .NET framework adds a hugely rich set of support classes but learning specific features isn't the way to do it as they are probably not transferable to "vanilla" C++ What I'd suggest is this: if you want to learn a language then go on a course, or get a book and learn that language. Don't try to learn "X" in the hope it'll make "Y" work as well because it won't - like learning to fly a drone won't teach you to fly a helicopter! That applies to C# and C++.

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

          C Offline
          C Offline
          Calin Negru
          wrote on last edited by
          #5

          I understand, C# is not just a beginners language it’s a language used for serious things. I’m looking to learn the features with a general purpose scope

          L 1 Reply Last reply
          0
          • C Calin Negru

            I’m writing my main project in c++ but in order to get better at c++ I need to improve my c# skills. My question is what should a person learn after getting comfortable with variables, lists and classes in C#. I remember seeing helper constructs that make certain operations when dealing with lists easier but at that time I could not understand them. What would be your recommendation for let’s say top four things to know after learning the basics in C#?

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

            I can strongly recommend C# in Depth[^]. You can buy copies from Amazon.

            C 1 Reply Last reply
            0
            • C Calin Negru

              I understand, C# is not just a beginners language it’s a language used for serious things. I’m looking to learn the features with a general purpose scope

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

              Then you want to learn "patterns"; not languages. The architect learns about windows and doors before flying butresses.

              "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

              C 1 Reply Last reply
              0
              • OriginalGriffO OriginalGriff

                If you want to improve your C# skills then randomly asking "what should I learn next" isn't the best way: there is just too much stuff in there. At it's heart, C# is a pretty simple language, but it's tightly integrated with the .NET framework which is frankly enormous. While variables and classes are part of C#, Lists and such like aren't - they are part of the framework. And while C# and C++ look pretty similar they really aren't, they are very different languages, which can use the same framework but don't have to - C++ doesn't need to use .NET at all! So "learning C# to get better at C++" isn't really a brilliant idea because you are learning stuff that isn't relevant and may not be transferable. It may be easier to learn how to think like a developer in C# because it's a lot more forgiving and the .NET framework adds a hugely rich set of support classes but learning specific features isn't the way to do it as they are probably not transferable to "vanilla" C++ What I'd suggest is this: if you want to learn a language then go on a course, or get a book and learn that language. Don't try to learn "X" in the hope it'll make "Y" work as well because it won't - like learning to fly a drone won't teach you to fly a helicopter! That applies to C# and C++.

                "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                P Offline
                P Offline
                PIEBALDconsult
                wrote on last edited by
                #8

                OriginalGriff wrote:

                easier to learn how to think like a developer in C#

                Which is the main issue as I see it. C# is easier than C/C++, which is a major strength. But learning it leaves a developer unprepared for C/C++ being hard. By which I mean that garbage collecting and such -- memory allocation and cleanup , references , etc. -- may be best learned in C/C++ before C#, as we oldsters did. I don't recommend C/C++ to any new developer unless they really need to learn it for some particular task. Basically I skipped C++ anyway and went from C to C# with barely a look back.

                OriginalGriffO 1 Reply Last reply
                0
                • P PIEBALDconsult

                  OriginalGriff wrote:

                  easier to learn how to think like a developer in C#

                  Which is the main issue as I see it. C# is easier than C/C++, which is a major strength. But learning it leaves a developer unprepared for C/C++ being hard. By which I mean that garbage collecting and such -- memory allocation and cleanup , references , etc. -- may be best learned in C/C++ before C#, as we oldsters did. I don't recommend C/C++ to any new developer unless they really need to learn it for some particular task. Basically I skipped C++ anyway and went from C to C# with barely a look back.

                  OriginalGriffO Offline
                  OriginalGriffO Offline
                  OriginalGriff
                  wrote on last edited by
                  #9

                  I went from Assembler to C to C++ to C# - and haven't looked back! The productivity improvement is absolutely priceless. Now, if I was still doing embedded work it would be different, but ... :-D

                  "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                  "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                  "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                  P 1 Reply Last reply
                  0
                  • OriginalGriffO OriginalGriff

                    I went from Assembler to C to C++ to C# - and haven't looked back! The productivity improvement is absolutely priceless. Now, if I was still doing embedded work it would be different, but ... :-D

                    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                    P Offline
                    P Offline
                    PIEBALDconsult
                    wrote on last edited by
                    #10

                    Yeah, barely had an introduction to Assembly (VAX Macro 11), quite a bit of C, just a dabbling of C++, and now C# for the past twenty years.

                    1 Reply Last reply
                    0
                    • C Calin Negru

                      I’m writing my main project in c++ but in order to get better at c++ I need to improve my c# skills. My question is what should a person learn after getting comfortable with variables, lists and classes in C#. I remember seeing helper constructs that make certain operations when dealing with lists easier but at that time I could not understand them. What would be your recommendation for let’s say top four things to know after learning the basics in C#?

                      B Offline
                      B Offline
                      BillWoodruff
                      wrote on last edited by
                      #11

                      Calin Negru wrote:

                      to get better at c++ I need to improve my c# skills

                      Why do you think this ?blockquote class="quote">

                      Calin Negru wrote:

                      I remember seeing helper constructs that make certain operations when dealing with lists easier but at that time I could not understand themCan you understand them now ? Study LINQ !

                      «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

                      C 1 Reply Last reply
                      0
                      • L Lost User

                        I can strongly recommend C# in Depth[^]. You can buy copies from Amazon.

                        C Offline
                        C Offline
                        Calin Negru
                        wrote on last edited by
                        #12

                        Thanks for the suggestion

                        1 Reply Last reply
                        0
                        • L Lost User

                          Then you want to learn "patterns"; not languages. The architect learns about windows and doors before flying butresses.

                          "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                          C Offline
                          C Offline
                          Calin Negru
                          wrote on last edited by
                          #13

                          A lot of C# features are probably there for dealing with specific tasks ( “link” is for working with databases, etc. ) But I’m sure there are also features useful for any type of project too >Then you want to learn patterns. I can’t imagine a learning resource that teaches abstract programming rules.

                          L J 2 Replies Last reply
                          0
                          • C Calin Negru

                            A lot of C# features are probably there for dealing with specific tasks ( “link” is for working with databases, etc. ) But I’m sure there are also features useful for any type of project too >Then you want to learn patterns. I can’t imagine a learning resource that teaches abstract programming rules.

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

                            You don't need wood and bricks to learn about windows.

                            "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                            1 Reply Last reply
                            0
                            • C Calin Negru

                              A lot of C# features are probably there for dealing with specific tasks ( “link” is for working with databases, etc. ) But I’m sure there are also features useful for any type of project too >Then you want to learn patterns. I can’t imagine a learning resource that teaches abstract programming rules.

                              J Offline
                              J Offline
                              jschell
                              wrote on last edited by
                              #15

                              Calin Negru wrote:

                              “link” is for working with databases, etc.

                              linq (spelling) was not added to deal with databases. It was added as a result of a surge of interest, or at least perceived interest, in functional programming. Then someone decided it would be a 'good' idea to use linq to access databases. They were wrong. They were not also the first ones to think that a generic in language source would somehow be better for database access. Long before that C++ (or maybe java) had an alternative in the language (sort of) for SQL. But it never took off. Probably for the similar reasons as it made simple problems simpler (which was never a complaint) but complex problems either difficult or even impossible to deal with.

                              L C 2 Replies Last reply
                              0
                              • J jschell

                                Calin Negru wrote:

                                “link” is for working with databases, etc.

                                linq (spelling) was not added to deal with databases. It was added as a result of a surge of interest, or at least perceived interest, in functional programming. Then someone decided it would be a 'good' idea to use linq to access databases. They were wrong. They were not also the first ones to think that a generic in language source would somehow be better for database access. Long before that C++ (or maybe java) had an alternative in the language (sort of) for SQL. But it never took off. Probably for the similar reasons as it made simple problems simpler (which was never a complaint) but complex problems either difficult or even impossible to deal with.

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

                                LINQ doesn't "do databases"; it does "data models". The "source" of the model varies: database; objects; XML. An architecture that allows for "new" types of sources. Most issues are due to not understanding the client / server relationship and the purpose of stored procedures.

                                "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                                J 1 Reply Last reply
                                0
                                • J jschell

                                  Calin Negru wrote:

                                  “link” is for working with databases, etc.

                                  linq (spelling) was not added to deal with databases. It was added as a result of a surge of interest, or at least perceived interest, in functional programming. Then someone decided it would be a 'good' idea to use linq to access databases. They were wrong. They were not also the first ones to think that a generic in language source would somehow be better for database access. Long before that C++ (or maybe java) had an alternative in the language (sort of) for SQL. But it never took off. Probably for the similar reasons as it made simple problems simpler (which was never a complaint) but complex problems either difficult or even impossible to deal with.

                                  C Offline
                                  C Offline
                                  Calin Negru
                                  wrote on last edited by
                                  #17

                                  Gerry, jschell The problem is I’m not programming a server or a client or anything that has to do with databases. Besides there is nothing in c++ like it AFAICT I’ve had a brief contact with C# list accessories ( the stuff used to interact with a list in different ways) it seems like that’s what I’m looking for. C++ vector has some of those things too.

                                  L 1 Reply Last reply
                                  0
                                  • C Calin Negru

                                    Gerry, jschell The problem is I’m not programming a server or a client or anything that has to do with databases. Besides there is nothing in c++ like it AFAICT I’ve had a brief contact with C# list accessories ( the stuff used to interact with a list in different ways) it seems like that’s what I’m looking for. C++ vector has some of those things too.

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

                                    I have an in-memory collection; it contains "blocks"; these blocks represent different types of troops; these troops belong to different "teams". Some blocks (brigades) have other blocks as children. Some blocks don't belong to any team. If I wanted to retrieve all "blue" infantry that were not currently in action, etc .... that's LINQ "to objects". LINQ, when used properly, gets rid of a pile of if's and for loops while doing "object oriented programming". If you're strictly "procedural", then none of this works for you.

                                    "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                                    C 1 Reply Last reply
                                    0
                                    • L Lost User

                                      I have an in-memory collection; it contains "blocks"; these blocks represent different types of troops; these troops belong to different "teams". Some blocks (brigades) have other blocks as children. Some blocks don't belong to any team. If I wanted to retrieve all "blue" infantry that were not currently in action, etc .... that's LINQ "to objects". LINQ, when used properly, gets rid of a pile of if's and for loops while doing "object oriented programming". If you're strictly "procedural", then none of this works for you.

                                      "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                                      C Offline
                                      C Offline
                                      Calin Negru
                                      wrote on last edited by
                                      #19

                                      Thanks for sharing Gerry

                                      1 Reply Last reply
                                      0
                                      • L Lost User

                                        LINQ doesn't "do databases"; it does "data models". The "source" of the model varies: database; objects; XML. An architecture that allows for "new" types of sources. Most issues are due to not understanding the client / server relationship and the purpose of stored procedures.

                                        "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                                        J Offline
                                        J Offline
                                        jschell
                                        wrote on last edited by
                                        #20

                                        Gerry Schmitz wrote:

                                        LINQ doesn't "do databases"; it does "data models". The "source" of the model varies: database; objects; XML

                                        No idea how that changes what I said.

                                        Gerry Schmitz wrote:

                                        Most issues are due to not understanding the client / server relationship and the purpose of stored procedures.

                                        I can't speak as to the source of of your "most" comment. But I can speak as to the problems I found of which I do not believe any had to do with stored procedures.

                                        1 Reply Last reply
                                        0
                                        • B BillWoodruff

                                          Calin Negru wrote:

                                          to get better at c++ I need to improve my c# skills

                                          Why do you think this ?blockquote class="quote">

                                          Calin Negru wrote:

                                          I remember seeing helper constructs that make certain operations when dealing with lists easier but at that time I could not understand themCan you understand them now ? Study LINQ !

                                          «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

                                          C Offline
                                          C Offline
                                          Calin Negru
                                          wrote on last edited by
                                          #21

                                          Bill your post seems to have some formatting problems

                                          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