Why would one ever use the “in” parameter modifier in C#?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
9
down vote

favorite
1












So, I (think I) understand what the in parameter modifier does. But what it does appears to be quite redundant.



Usually, I'd think that the only reason to use a ref would be to modify the calling variable, which is explicitly forbidden by in. So passing by in reference seems logically equivalent to passing by value.



Is there some sort of performance advantage? It was my belief that on the back-end side of things, a ref parameter must at least copy the physical address of the variable, which should be the same size as any typical object reference.



So, then is the advantage just in larger structs, or is there some behind-the-scenes compiler optimization that makes it attractive elsewhere? If the latter, why shouldn't I make every parameter an in?










share|improve this question









New contributor




Travis Reed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Yes, there is a performance advantage. ref is used to pass structs by reference instead of copying them. in means the struct shouldn't be modified.
    – Panagiotis Kanavos
    52 mins ago











  • @dbc no, this has nothing to do with interop
    – Panagiotis Kanavos
    50 mins ago






  • 2




    Performance for value types.The New “in” Keyword For C# 7.2
    – Silvermind
    50 mins ago











  • Detailed discussion here. Note the last warning: It means that you should never pass a non-readonly struct as in parameter.
    – Panagiotis Kanavos
    46 mins ago















up vote
9
down vote

favorite
1












So, I (think I) understand what the in parameter modifier does. But what it does appears to be quite redundant.



Usually, I'd think that the only reason to use a ref would be to modify the calling variable, which is explicitly forbidden by in. So passing by in reference seems logically equivalent to passing by value.



Is there some sort of performance advantage? It was my belief that on the back-end side of things, a ref parameter must at least copy the physical address of the variable, which should be the same size as any typical object reference.



So, then is the advantage just in larger structs, or is there some behind-the-scenes compiler optimization that makes it attractive elsewhere? If the latter, why shouldn't I make every parameter an in?










share|improve this question









New contributor




Travis Reed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Yes, there is a performance advantage. ref is used to pass structs by reference instead of copying them. in means the struct shouldn't be modified.
    – Panagiotis Kanavos
    52 mins ago











  • @dbc no, this has nothing to do with interop
    – Panagiotis Kanavos
    50 mins ago






  • 2




    Performance for value types.The New “in” Keyword For C# 7.2
    – Silvermind
    50 mins ago











  • Detailed discussion here. Note the last warning: It means that you should never pass a non-readonly struct as in parameter.
    – Panagiotis Kanavos
    46 mins ago













up vote
9
down vote

favorite
1









up vote
9
down vote

favorite
1






1





So, I (think I) understand what the in parameter modifier does. But what it does appears to be quite redundant.



Usually, I'd think that the only reason to use a ref would be to modify the calling variable, which is explicitly forbidden by in. So passing by in reference seems logically equivalent to passing by value.



Is there some sort of performance advantage? It was my belief that on the back-end side of things, a ref parameter must at least copy the physical address of the variable, which should be the same size as any typical object reference.



So, then is the advantage just in larger structs, or is there some behind-the-scenes compiler optimization that makes it attractive elsewhere? If the latter, why shouldn't I make every parameter an in?










share|improve this question









New contributor




Travis Reed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











So, I (think I) understand what the in parameter modifier does. But what it does appears to be quite redundant.



Usually, I'd think that the only reason to use a ref would be to modify the calling variable, which is explicitly forbidden by in. So passing by in reference seems logically equivalent to passing by value.



Is there some sort of performance advantage? It was my belief that on the back-end side of things, a ref parameter must at least copy the physical address of the variable, which should be the same size as any typical object reference.



So, then is the advantage just in larger structs, or is there some behind-the-scenes compiler optimization that makes it attractive elsewhere? If the latter, why shouldn't I make every parameter an in?







c# c#-7.2






share|improve this question









New contributor




Travis Reed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Travis Reed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 24 mins ago









Magnetron

2,271719




2,271719






New contributor




Travis Reed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 55 mins ago









Travis Reed

463




463




New contributor




Travis Reed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Travis Reed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Travis Reed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • Yes, there is a performance advantage. ref is used to pass structs by reference instead of copying them. in means the struct shouldn't be modified.
    – Panagiotis Kanavos
    52 mins ago











  • @dbc no, this has nothing to do with interop
    – Panagiotis Kanavos
    50 mins ago






  • 2




    Performance for value types.The New “in” Keyword For C# 7.2
    – Silvermind
    50 mins ago











  • Detailed discussion here. Note the last warning: It means that you should never pass a non-readonly struct as in parameter.
    – Panagiotis Kanavos
    46 mins ago

















  • Yes, there is a performance advantage. ref is used to pass structs by reference instead of copying them. in means the struct shouldn't be modified.
    – Panagiotis Kanavos
    52 mins ago











  • @dbc no, this has nothing to do with interop
    – Panagiotis Kanavos
    50 mins ago






  • 2




    Performance for value types.The New “in” Keyword For C# 7.2
    – Silvermind
    50 mins ago











  • Detailed discussion here. Note the last warning: It means that you should never pass a non-readonly struct as in parameter.
    – Panagiotis Kanavos
    46 mins ago
















Yes, there is a performance advantage. ref is used to pass structs by reference instead of copying them. in means the struct shouldn't be modified.
– Panagiotis Kanavos
52 mins ago





Yes, there is a performance advantage. ref is used to pass structs by reference instead of copying them. in means the struct shouldn't be modified.
– Panagiotis Kanavos
52 mins ago













@dbc no, this has nothing to do with interop
– Panagiotis Kanavos
50 mins ago




@dbc no, this has nothing to do with interop
– Panagiotis Kanavos
50 mins ago




2




2




Performance for value types.The New “in” Keyword For C# 7.2
– Silvermind
50 mins ago





Performance for value types.The New “in” Keyword For C# 7.2
– Silvermind
50 mins ago













Detailed discussion here. Note the last warning: It means that you should never pass a non-readonly struct as in parameter.
– Panagiotis Kanavos
46 mins ago





Detailed discussion here. Note the last warning: It means that you should never pass a non-readonly struct as in parameter.
– Panagiotis Kanavos
46 mins ago













3 Answers
3






active

oldest

votes

















up vote
6
down vote













in was recently introduced to the C# language.



in is actually a ref readonly. Generally speaking, there is only one use case where in can be helpful: high performance apps dealing with lots of large readonly structs.



Assuming you have:



readonly struct VeryLarge

public readonly long Value1;
public readonly long Value2;
// etc



and



void Process(in VeryLarge value) 


In that case, the VeryLarge struct will be passed by-reference without creating of defensive copies when using this struct in the method, and the struct immutability is ensured by the compiler.



Note that passing a not-readonly struct with an in modifier will cause the compiler to create a defensive copy when using that struct in the method, which will negatively affect performance!



There is a really good MSDN blog entry which I recommend to carefully read.



If you would like to get some more historical background of in-introducing, you could read this discussion in the C# language's GitHub repository.



In general, most developers agree that introducing of in could be seen as a mistake. It's a rather exotic language feature and can only be useful in high-perf edge cases.






share|improve this answer





























    up vote
    2
    down vote













    There is. When passing a struct, the in keyword allows an optimization where the compiler only needs to pass a pointer, without the risk of the method changing the content. The last is critical — it avoids a copy operation. On large structs this can make a world of difference.






    share|improve this answer


















    • 1




      This is just repeating what the question already says, and doesn't answer the actual question it asks.
      – Servy
      45 mins ago











    • Only in readonly structs. Otherwise the compiler will still create a defensive copy
      – Panagiotis Kanavos
      45 mins ago










    • Actually no. It is confirming that there is a performanc ebenefit. Given that IN was created in the performance run through the langauge, yes, that IS the reason. It ALLOWS an optmization (on readonly structs).
      – TomTom
      44 mins ago






    • 1




      @TomTom Again, which the question already covered. What it asks is, "So, then is the advantage just in larger structs, or is there some behind-the-scenes compiler optimization that makes it attractive elsewhere? If the latter, why shouldn't I make every parameter an in?" Note how it's not asking if it's actually beneficial for larger structs, or just when it's beneficial at all. It's just asking if it's beneficial for smaller structs (and then a follow up if yes). You haven't answer either question.
      – Servy
      43 mins ago

















    up vote
    0
    down vote













    This is done because of the functional programming approach. One of the major principle is that function should not have side effects, which means it should not change values of the parameters and should return some value. In C# there was no way to pass structs(and value type) without being copied only by reference which allows changing of the value. In swift there is a hacky algorithm which copies struct (their collections are structs BTW) as long as method starts changing its values. People who use swift not all aware of the copy stuff. This is nice c# feature since it's memory efficient and explicit. If you look at what's new you will see that more and more stuff is done around structs and arrays in stack. And in statement is just necessary for these features. There are limitations mentioned in the other answers, but is not that essential for understanding where .net is heading.






    share|improve this answer






















      Your Answer





      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );






      Travis Reed is a new contributor. Be nice, and check out our Code of Conduct.









       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52820372%2fwhy-would-one-ever-use-the-in-parameter-modifier-in-c%23new-answer', 'question_page');

      );

      Post as a guest






























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      6
      down vote













      in was recently introduced to the C# language.



      in is actually a ref readonly. Generally speaking, there is only one use case where in can be helpful: high performance apps dealing with lots of large readonly structs.



      Assuming you have:



      readonly struct VeryLarge

      public readonly long Value1;
      public readonly long Value2;
      // etc



      and



      void Process(in VeryLarge value) 


      In that case, the VeryLarge struct will be passed by-reference without creating of defensive copies when using this struct in the method, and the struct immutability is ensured by the compiler.



      Note that passing a not-readonly struct with an in modifier will cause the compiler to create a defensive copy when using that struct in the method, which will negatively affect performance!



      There is a really good MSDN blog entry which I recommend to carefully read.



      If you would like to get some more historical background of in-introducing, you could read this discussion in the C# language's GitHub repository.



      In general, most developers agree that introducing of in could be seen as a mistake. It's a rather exotic language feature and can only be useful in high-perf edge cases.






      share|improve this answer


























        up vote
        6
        down vote













        in was recently introduced to the C# language.



        in is actually a ref readonly. Generally speaking, there is only one use case where in can be helpful: high performance apps dealing with lots of large readonly structs.



        Assuming you have:



        readonly struct VeryLarge

        public readonly long Value1;
        public readonly long Value2;
        // etc



        and



        void Process(in VeryLarge value) 


        In that case, the VeryLarge struct will be passed by-reference without creating of defensive copies when using this struct in the method, and the struct immutability is ensured by the compiler.



        Note that passing a not-readonly struct with an in modifier will cause the compiler to create a defensive copy when using that struct in the method, which will negatively affect performance!



        There is a really good MSDN blog entry which I recommend to carefully read.



        If you would like to get some more historical background of in-introducing, you could read this discussion in the C# language's GitHub repository.



        In general, most developers agree that introducing of in could be seen as a mistake. It's a rather exotic language feature and can only be useful in high-perf edge cases.






        share|improve this answer
























          up vote
          6
          down vote










          up vote
          6
          down vote









          in was recently introduced to the C# language.



          in is actually a ref readonly. Generally speaking, there is only one use case where in can be helpful: high performance apps dealing with lots of large readonly structs.



          Assuming you have:



          readonly struct VeryLarge

          public readonly long Value1;
          public readonly long Value2;
          // etc



          and



          void Process(in VeryLarge value) 


          In that case, the VeryLarge struct will be passed by-reference without creating of defensive copies when using this struct in the method, and the struct immutability is ensured by the compiler.



          Note that passing a not-readonly struct with an in modifier will cause the compiler to create a defensive copy when using that struct in the method, which will negatively affect performance!



          There is a really good MSDN blog entry which I recommend to carefully read.



          If you would like to get some more historical background of in-introducing, you could read this discussion in the C# language's GitHub repository.



          In general, most developers agree that introducing of in could be seen as a mistake. It's a rather exotic language feature and can only be useful in high-perf edge cases.






          share|improve this answer














          in was recently introduced to the C# language.



          in is actually a ref readonly. Generally speaking, there is only one use case where in can be helpful: high performance apps dealing with lots of large readonly structs.



          Assuming you have:



          readonly struct VeryLarge

          public readonly long Value1;
          public readonly long Value2;
          // etc



          and



          void Process(in VeryLarge value) 


          In that case, the VeryLarge struct will be passed by-reference without creating of defensive copies when using this struct in the method, and the struct immutability is ensured by the compiler.



          Note that passing a not-readonly struct with an in modifier will cause the compiler to create a defensive copy when using that struct in the method, which will negatively affect performance!



          There is a really good MSDN blog entry which I recommend to carefully read.



          If you would like to get some more historical background of in-introducing, you could read this discussion in the C# language's GitHub repository.



          In general, most developers agree that introducing of in could be seen as a mistake. It's a rather exotic language feature and can only be useful in high-perf edge cases.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 22 mins ago

























          answered 49 mins ago









          dymanoid

          6,45421844




          6,45421844






















              up vote
              2
              down vote













              There is. When passing a struct, the in keyword allows an optimization where the compiler only needs to pass a pointer, without the risk of the method changing the content. The last is critical — it avoids a copy operation. On large structs this can make a world of difference.






              share|improve this answer


















              • 1




                This is just repeating what the question already says, and doesn't answer the actual question it asks.
                – Servy
                45 mins ago











              • Only in readonly structs. Otherwise the compiler will still create a defensive copy
                – Panagiotis Kanavos
                45 mins ago










              • Actually no. It is confirming that there is a performanc ebenefit. Given that IN was created in the performance run through the langauge, yes, that IS the reason. It ALLOWS an optmization (on readonly structs).
                – TomTom
                44 mins ago






              • 1




                @TomTom Again, which the question already covered. What it asks is, "So, then is the advantage just in larger structs, or is there some behind-the-scenes compiler optimization that makes it attractive elsewhere? If the latter, why shouldn't I make every parameter an in?" Note how it's not asking if it's actually beneficial for larger structs, or just when it's beneficial at all. It's just asking if it's beneficial for smaller structs (and then a follow up if yes). You haven't answer either question.
                – Servy
                43 mins ago














              up vote
              2
              down vote













              There is. When passing a struct, the in keyword allows an optimization where the compiler only needs to pass a pointer, without the risk of the method changing the content. The last is critical — it avoids a copy operation. On large structs this can make a world of difference.






              share|improve this answer


















              • 1




                This is just repeating what the question already says, and doesn't answer the actual question it asks.
                – Servy
                45 mins ago











              • Only in readonly structs. Otherwise the compiler will still create a defensive copy
                – Panagiotis Kanavos
                45 mins ago










              • Actually no. It is confirming that there is a performanc ebenefit. Given that IN was created in the performance run through the langauge, yes, that IS the reason. It ALLOWS an optmization (on readonly structs).
                – TomTom
                44 mins ago






              • 1




                @TomTom Again, which the question already covered. What it asks is, "So, then is the advantage just in larger structs, or is there some behind-the-scenes compiler optimization that makes it attractive elsewhere? If the latter, why shouldn't I make every parameter an in?" Note how it's not asking if it's actually beneficial for larger structs, or just when it's beneficial at all. It's just asking if it's beneficial for smaller structs (and then a follow up if yes). You haven't answer either question.
                – Servy
                43 mins ago












              up vote
              2
              down vote










              up vote
              2
              down vote









              There is. When passing a struct, the in keyword allows an optimization where the compiler only needs to pass a pointer, without the risk of the method changing the content. The last is critical — it avoids a copy operation. On large structs this can make a world of difference.






              share|improve this answer














              There is. When passing a struct, the in keyword allows an optimization where the compiler only needs to pass a pointer, without the risk of the method changing the content. The last is critical — it avoids a copy operation. On large structs this can make a world of difference.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited 48 mins ago









              Joel Coehoorn

              300k94487714




              300k94487714










              answered 51 mins ago









              TomTom

              48k363118




              48k363118







              • 1




                This is just repeating what the question already says, and doesn't answer the actual question it asks.
                – Servy
                45 mins ago











              • Only in readonly structs. Otherwise the compiler will still create a defensive copy
                – Panagiotis Kanavos
                45 mins ago










              • Actually no. It is confirming that there is a performanc ebenefit. Given that IN was created in the performance run through the langauge, yes, that IS the reason. It ALLOWS an optmization (on readonly structs).
                – TomTom
                44 mins ago






              • 1




                @TomTom Again, which the question already covered. What it asks is, "So, then is the advantage just in larger structs, or is there some behind-the-scenes compiler optimization that makes it attractive elsewhere? If the latter, why shouldn't I make every parameter an in?" Note how it's not asking if it's actually beneficial for larger structs, or just when it's beneficial at all. It's just asking if it's beneficial for smaller structs (and then a follow up if yes). You haven't answer either question.
                – Servy
                43 mins ago












              • 1




                This is just repeating what the question already says, and doesn't answer the actual question it asks.
                – Servy
                45 mins ago











              • Only in readonly structs. Otherwise the compiler will still create a defensive copy
                – Panagiotis Kanavos
                45 mins ago










              • Actually no. It is confirming that there is a performanc ebenefit. Given that IN was created in the performance run through the langauge, yes, that IS the reason. It ALLOWS an optmization (on readonly structs).
                – TomTom
                44 mins ago






              • 1




                @TomTom Again, which the question already covered. What it asks is, "So, then is the advantage just in larger structs, or is there some behind-the-scenes compiler optimization that makes it attractive elsewhere? If the latter, why shouldn't I make every parameter an in?" Note how it's not asking if it's actually beneficial for larger structs, or just when it's beneficial at all. It's just asking if it's beneficial for smaller structs (and then a follow up if yes). You haven't answer either question.
                – Servy
                43 mins ago







              1




              1




              This is just repeating what the question already says, and doesn't answer the actual question it asks.
              – Servy
              45 mins ago





              This is just repeating what the question already says, and doesn't answer the actual question it asks.
              – Servy
              45 mins ago













              Only in readonly structs. Otherwise the compiler will still create a defensive copy
              – Panagiotis Kanavos
              45 mins ago




              Only in readonly structs. Otherwise the compiler will still create a defensive copy
              – Panagiotis Kanavos
              45 mins ago












              Actually no. It is confirming that there is a performanc ebenefit. Given that IN was created in the performance run through the langauge, yes, that IS the reason. It ALLOWS an optmization (on readonly structs).
              – TomTom
              44 mins ago




              Actually no. It is confirming that there is a performanc ebenefit. Given that IN was created in the performance run through the langauge, yes, that IS the reason. It ALLOWS an optmization (on readonly structs).
              – TomTom
              44 mins ago




              1




              1




              @TomTom Again, which the question already covered. What it asks is, "So, then is the advantage just in larger structs, or is there some behind-the-scenes compiler optimization that makes it attractive elsewhere? If the latter, why shouldn't I make every parameter an in?" Note how it's not asking if it's actually beneficial for larger structs, or just when it's beneficial at all. It's just asking if it's beneficial for smaller structs (and then a follow up if yes). You haven't answer either question.
              – Servy
              43 mins ago




              @TomTom Again, which the question already covered. What it asks is, "So, then is the advantage just in larger structs, or is there some behind-the-scenes compiler optimization that makes it attractive elsewhere? If the latter, why shouldn't I make every parameter an in?" Note how it's not asking if it's actually beneficial for larger structs, or just when it's beneficial at all. It's just asking if it's beneficial for smaller structs (and then a follow up if yes). You haven't answer either question.
              – Servy
              43 mins ago










              up vote
              0
              down vote













              This is done because of the functional programming approach. One of the major principle is that function should not have side effects, which means it should not change values of the parameters and should return some value. In C# there was no way to pass structs(and value type) without being copied only by reference which allows changing of the value. In swift there is a hacky algorithm which copies struct (their collections are structs BTW) as long as method starts changing its values. People who use swift not all aware of the copy stuff. This is nice c# feature since it's memory efficient and explicit. If you look at what's new you will see that more and more stuff is done around structs and arrays in stack. And in statement is just necessary for these features. There are limitations mentioned in the other answers, but is not that essential for understanding where .net is heading.






              share|improve this answer


























                up vote
                0
                down vote













                This is done because of the functional programming approach. One of the major principle is that function should not have side effects, which means it should not change values of the parameters and should return some value. In C# there was no way to pass structs(and value type) without being copied only by reference which allows changing of the value. In swift there is a hacky algorithm which copies struct (their collections are structs BTW) as long as method starts changing its values. People who use swift not all aware of the copy stuff. This is nice c# feature since it's memory efficient and explicit. If you look at what's new you will see that more and more stuff is done around structs and arrays in stack. And in statement is just necessary for these features. There are limitations mentioned in the other answers, but is not that essential for understanding where .net is heading.






                share|improve this answer
























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  This is done because of the functional programming approach. One of the major principle is that function should not have side effects, which means it should not change values of the parameters and should return some value. In C# there was no way to pass structs(and value type) without being copied only by reference which allows changing of the value. In swift there is a hacky algorithm which copies struct (their collections are structs BTW) as long as method starts changing its values. People who use swift not all aware of the copy stuff. This is nice c# feature since it's memory efficient and explicit. If you look at what's new you will see that more and more stuff is done around structs and arrays in stack. And in statement is just necessary for these features. There are limitations mentioned in the other answers, but is not that essential for understanding where .net is heading.






                  share|improve this answer














                  This is done because of the functional programming approach. One of the major principle is that function should not have side effects, which means it should not change values of the parameters and should return some value. In C# there was no way to pass structs(and value type) without being copied only by reference which allows changing of the value. In swift there is a hacky algorithm which copies struct (their collections are structs BTW) as long as method starts changing its values. People who use swift not all aware of the copy stuff. This is nice c# feature since it's memory efficient and explicit. If you look at what's new you will see that more and more stuff is done around structs and arrays in stack. And in statement is just necessary for these features. There are limitations mentioned in the other answers, but is not that essential for understanding where .net is heading.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 18 mins ago

























                  answered 35 mins ago









                  Access Denied

                  4,14011340




                  4,14011340




















                      Travis Reed is a new contributor. Be nice, and check out our Code of Conduct.









                       

                      draft saved


                      draft discarded


















                      Travis Reed is a new contributor. Be nice, and check out our Code of Conduct.












                      Travis Reed is a new contributor. Be nice, and check out our Code of Conduct.











                      Travis Reed is a new contributor. Be nice, and check out our Code of Conduct.













                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52820372%2fwhy-would-one-ever-use-the-in-parameter-modifier-in-c%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      Long meetings (6-7 hours a day): Being “babysat” by supervisor

                      Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                      Confectionery