lesPaul456's Profile User Rating: *****

Reputation: 173 Stalwart
Group:
Author w/DIC++
Active Posts:
728 (0.4 per day)
Joined:
16-April 09
Profile Views:
14,180
Last Active:
User is offline May 07 2012 08:11 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
XBox
Your Car:
Who Cares
Dream Kudos:
275
Expert In:
C#, XNA

Latest Visitors

Icon   lesPaul456 is starting a new job as a .NET Developer!

Posts I've Made

  1. In Topic: The Future of XNA - The Underwritten Truths

    Posted 7 May 2012

    Well in Windows 8 there's now these new metro style apps created using Silverlight or HTML/Javascript. These do not support XNA. However, there's still the desktop environment that supports anything that could run in Windows 7. So it is still supported to a small degree. Tablets would not support XNA at all.

    I guess we'll just have to wait and see.
  2. In Topic: Pure design question: protected vs private with abstract classes

    Posted 6 May 2012

    I've heard many arguments for both sides and I personally lean towards not using protected members. Protected members definitely have their place. However, like most things, they are often misused and abused.

    I like to keep my member variables private and only expose them to client code using public properties when necessary. I will occasionally create protected properties, but the need rarely arises. So, generally speaking, I prefer to keep my member variables private.

    Protected methods, on the other hand, I find very useful, especially when creating abstract classes.
  3. In Topic: Using Properties or Fields

    Posted 6 May 2012

    @racidon: The object itself is read only, the underlying collection is not. As bonyjoe pointed out, a ReadOnlyCollection can be used to prevent client code from modifying collections.
  4. In Topic: Using Properties or Fields

    Posted 5 May 2012

    View Postracidon, on 05 May 2012 - 05:10 AM, said:

    @Kilorn

    To add to lesPaul456, having only a get will only make it "immutable" when on data structures are being used, once you introduce "Reference Types" such as a List<T> you're able to modify the values.

    Example for DanielLeone

    public List<int> Indicies
    {
    get{return _indicies;}
    }


    allows you to do the following outside the class

    Indicies = new List<int>;

    As the "get" returns a reference to memory rather than just the value itself.
    But this can be fixed with the following:

    public List<int> Indicies
    {
    get{return (List<int>)_indicies.Clone();}
    }

    That will be more load on the cpu (only noticeable with large repeats/data) but will return a new area in memory that will be disposed of shortly after. Any assignment to it will not be saved.


    Just to clarify, in C# all classes are reference types.

    A property that provides only a getter is read only, even in the example you provided.
  5. In Topic: video was working but suddenly stopped

    Posted 4 May 2012

    Can you be more specific about the error that is being thrown? What line is the debugger breaking at? If possible, it may help to post the stack trace so we can get a better idea of what the error is and what's causing it.

My Information

Member Title:
D.I.C Addict
Age:
23 years old
Birthday:
April 27, 1990
Gender:
Location:
Baltimore, MD
Interests:
Programming (C#, C++)
Playing the guitar
Painting
Writing
Full Name:
Stefan
Years Programming:
3

Contact Information

E-mail:
Click here to e-mail me
AIM:
AIM  lesPaul456@gmail.com
MSN:
MSN  lesPaul456@gmail.com

Comments

lesPaul456 has no profile comments yet. Why not say hello?