Centuri0n

Couldn't find any big difference between functions and properties, except you can see with quick watch properties data at runtime. Is there any perfomance difference, or that doesn't matter wich one to use

In msdn tutorial it's said it's better to use properties to manipulate with variables, so instead of making variable public, i need make a private variable plus public property to read/write that variable. Wouldn't properties slow down my application

Same question regards Class or Structure. When i need to store big amount of elements does this matter what to use class or structure



Re: .NET Base Class Library Functions vs Properties, Class vs Structure, Variables vs Properties

.NETPhreak

Very intriguing question! Believe it or not, but the CLR exposes properties as method calls at compile-time Smile. Look it up for yourself... thorugh ILDASM (the IL disassembler).

As far as classes and structures go, there is a huge differnece. Classes are reference types while structures are value types. There are numerous articles on this topic... just search for it on the Net. If you are dealing with larger 'objects,' classes would be better, but it is not uncommon to mix the two types in a library/application.