Click here to Skip to main content
15,892,697 members
Home / Discussions / C#
   

C#

 
GeneralRe: Microsoft.Office.Interop.Excel BorderAround2 crash Pin
Blubbo7-Oct-10 4:02
Blubbo7-Oct-10 4:02 
GeneralRe: Microsoft.Office.Interop.Excel BorderAround2 crash Pin
Dave Kreskowiak7-Oct-10 4:42
mveDave Kreskowiak7-Oct-10 4:42 
GeneralRe: Microsoft.Office.Interop.Excel BorderAround2 crash Pin
Blubbo7-Oct-10 4:49
Blubbo7-Oct-10 4:49 
GeneralRe: Microsoft.Office.Interop.Excel BorderAround2 crash Pin
Dave Kreskowiak7-Oct-10 6:04
mveDave Kreskowiak7-Oct-10 6:04 
GeneralRe: Microsoft.Office.Interop.Excel BorderAround2 crash Pin
Luc Pattyn7-Oct-10 6:29
sitebuilderLuc Pattyn7-Oct-10 6:29 
QuestionSave a file from ASP.NET down to database and upp again. Pin
anderslundsgard6-Oct-10 23:44
anderslundsgard6-Oct-10 23:44 
AnswerRe: Save a file from ASP.NET down to database and upp again. Pin
J4amieC7-Oct-10 0:50
J4amieC7-Oct-10 0:50 
Questionmake mouse disable, how that user could not be able to use it. Pin
Fred 346-Oct-10 23:36
Fred 346-Oct-10 23:36 
AnswerRe: make mouse disable, how that user could not be able to use it. Pin
Eddy Vluggen7-Oct-10 1:01
professionalEddy Vluggen7-Oct-10 1:01 
AnswerRe: make mouse disable, how that user could not be able to use it. Pin
Rhuros7-Oct-10 1:35
professionalRhuros7-Oct-10 1:35 
AnswerRe: make mouse disable, how that user could not be able to use it. Pin
S Houghtelin7-Oct-10 5:52
professionalS Houghtelin7-Oct-10 5:52 
GeneralRe: make mouse disable, how that user could not be able to use it. Pin
PIEBALDconsult9-Oct-10 4:27
mvePIEBALDconsult9-Oct-10 4:27 
GeneralRe: make mouse disable, how that user could not be able to use it. Pin
S Houghtelin12-Oct-10 3:09
professionalS Houghtelin12-Oct-10 3:09 
QuestionList inside a struct Pin
Islorvat6-Oct-10 22:45
Islorvat6-Oct-10 22:45 
AnswerRe: List inside a struct Pin
J4amieC6-Oct-10 22:57
J4amieC6-Oct-10 22:57 
AnswerRe: List inside a struct Pin
DaveyM697-Oct-10 0:11
professionalDaveyM697-Oct-10 0:11 
GeneralRe: List inside a struct Pin
harold aptroot7-Oct-10 0:39
harold aptroot7-Oct-10 0:39 
GeneralRe: List inside a struct Pin
DaveyM697-Oct-10 7:02
professionalDaveyM697-Oct-10 7:02 
True, I hadn't actually considered that!
I still don't like it due to the mutability implied by using a reference type inside a struct, especially with List<T> as the contents would be mutable even if the exposed list wasn't. A ReadOnlyCollection<T> would be OK I suppose, something like this wrapper...
C#
public struct ExampleStruct
{
    private List<string> list;

    public ExampleStruct(IEnumerable<string> strings)
    {
        if (strings == null)
            list = null;
        else
            list = new List<string>(strings);
    }

    public ReadOnlyCollection<string> List
    {
        get
        {
            if (list == null)
                return null;
            return list.AsReadOnly();
        }
    }
}

Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



GeneralRe: List inside a struct Pin
harold aptroot7-Oct-10 7:05
harold aptroot7-Oct-10 7:05 
GeneralRe: List inside a struct Pin
DaveyM697-Oct-10 7:14
professionalDaveyM697-Oct-10 7:14 
QuestionApplication Fauled to Initialize (0xc000007b) Pin
Enobong Adahada6-Oct-10 22:12
Enobong Adahada6-Oct-10 22:12 
AnswerRe: Application Fauled to Initialize (0xc000007b) Pin
Sauro Viti6-Oct-10 22:26
professionalSauro Viti6-Oct-10 22:26 
GeneralRe: Application Fauled to Initialize (0xc000007b) Pin
Enobong Adahada7-Oct-10 3:12
Enobong Adahada7-Oct-10 3:12 
AnswerRe: Application Fauled to Initialize (0xc000007b) Pin
Luc Pattyn7-Oct-10 3:25
sitebuilderLuc Pattyn7-Oct-10 3:25 
GeneralRe: Application Fauled to Initialize (0xc000007b) Pin
Enobong Adahada7-Oct-10 3:53
Enobong Adahada7-Oct-10 3:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.