CSharpFeeds - All your C# feeds in one place.

Wednesday, September 01, 2010

Parameters: by value or by reference? Say what?

by luisabreu via LA.NET [EN] on 9/1/2010 7:33:31 PM

I’m guessing that I won’t be giving any news when I say that parameters are used for passing values into methods. By default, parameters are passed by value. Here’s a quick example which will let us discuss this behavior: public class Student { public String Name { get; set; } public Int32 Age { get; set; } } static void ChangeName(Student std) { std.Name = DateTime.Now.ToString() } As I was saying, parameters are passed by value. And that’s true. However, many still are surprised ...

[ read more ]

Applying Interface Segregation to Configuration Files

by ssmith via Blog on 9/1/2010 12:22:00 AM

In .NET, it’s very easy to set up custom configuration section handlers to handle your application or component’s configuration needs.  As my previous post shows, it’s also very easy to configure these with attributes that enforce required fields and other validation.  However, over time it’s very easy to create fairly large configuration sections that violate the Interface Segregation Principle, which states that classes shouldn’t be forced to depend on things they don’t need. Consid ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us