Click here to Skip to main content
15,914,327 members
Home / Discussions / C#
   

C#

 
GeneralRe: Converting special string array into two different byte arrays Pin
MichCl12-Apr-12 5:00
MichCl12-Apr-12 5:00 
GeneralRe: Converting special string array into two different byte arrays Pin
OriginalGriff12-Apr-12 5:56
mveOriginalGriff12-Apr-12 5:56 
GeneralRe: Converting special string array into two different byte arrays Pin
MichCl17-Apr-12 7:42
MichCl17-Apr-12 7:42 
GeneralRe: Converting special string array into two different byte arrays Pin
OriginalGriff17-Apr-12 8:03
mveOriginalGriff17-Apr-12 8:03 
GeneralRe: Converting special string array into two different byte arrays Pin
MichCl17-Apr-12 8:34
MichCl17-Apr-12 8:34 
GeneralRe: Converting special string array into two different byte arrays Pin
OriginalGriff17-Apr-12 8:43
mveOriginalGriff17-Apr-12 8:43 
GeneralRe: Converting special string array into two different byte arrays Pin
MichCl17-Apr-12 9:15
MichCl17-Apr-12 9:15 
Suggestionproject Pin
Apurba Chatterjee11-Apr-12 8:18
Apurba Chatterjee11-Apr-12 8:18 
AnswerRe: project Pin
ZurdoDev11-Apr-12 8:33
professionalZurdoDev11-Apr-12 8:33 
GeneralRe: project Pin
Big Daddy Farang11-Apr-12 9:18
Big Daddy Farang11-Apr-12 9:18 
JokeRe: project Pin
ZurdoDev11-Apr-12 9:19
professionalZurdoDev11-Apr-12 9:19 
JokeRe: project Pin
V.11-Apr-12 21:02
professionalV.11-Apr-12 21:02 
GeneralRe: project Pin
ZurdoDev12-Apr-12 1:47
professionalZurdoDev12-Apr-12 1:47 
GeneralRe: project Pin
RobCroll11-Apr-12 18:52
RobCroll11-Apr-12 18:52 
QuestionExport Mutiple DataGridView to Multiple Sheets in an Excel File ... Pin
nassimnastaran11-Apr-12 8:15
nassimnastaran11-Apr-12 8:15 
QuestionPlease help me on using this codeproject Pin
aquahoya11-Apr-12 6:39
aquahoya11-Apr-12 6:39 
AnswerRe: Please help me on using this codeproject Pin
Richard MacCutchan11-Apr-12 6:55
mveRichard MacCutchan11-Apr-12 6:55 
AnswerRe: Please help me on using this codeproject Pin
Big Daddy Farang11-Apr-12 7:24
Big Daddy Farang11-Apr-12 7:24 
AnswerRe: still having problem =( Pin
aquahoya11-Apr-12 7:46
aquahoya11-Apr-12 7:46 
GeneralRe: still having problem =( Pin
Big Daddy Farang11-Apr-12 9:07
Big Daddy Farang11-Apr-12 9:07 
GeneralRe: still having problem =( Pin
aquahoya11-Apr-12 9:34
aquahoya11-Apr-12 9:34 
GeneralRe: OMG u did it!!! =) Pin
aquahoya11-Apr-12 9:57
aquahoya11-Apr-12 9:57 
GeneralRe: OMG u did it!!! =) Pin
Big Daddy Farang11-Apr-12 10:03
Big Daddy Farang11-Apr-12 10:03 
QuestionDo u find c# descent? Pin
Mark Kruger11-Apr-12 5:13
Mark Kruger11-Apr-12 5:13 
What i mean,
i keep finding out spots in c# where i think,
microsoft but why.

For example the ICollection-generic interface
which has been derived van IEnumerable and IEnumerable-generic
which let u implement the same named function only with a different return type and u think like, that can't be so how can i not implement icollection and list, dictionary etc while microsoft can.

Why is it that i need to cast a dictionary to ICollection-KeyValuePair first before i can call the dictionary's CopyTo method to get it's whole list and not just values or keys.

Or for instance when u work with an dictionary the way i do
in my latest program for my work i want copies of the retrieval
cause i need to detect chances against the dictionary.

I Used to make a getcopy function where i would pass the object
and would return a new instance filled with the data from the other.

Then when i was playing around a bit u find out that object
has MemberwiseClone only u can't access it normally.

I ended up writing the next for something which is present
on each object (should need less flags, wasn't in the mood to find out which i could skip)

C#
private const System.Reflection.BindingFlags FullAccess = System.Reflection.BindingFlags.CreateInstance |
                                                          System.Reflection.BindingFlags.GetField |
                                                          System.Reflection.BindingFlags.GetProperty |
                                                          System.Reflection.BindingFlags.Instance |
                                                          System.Reflection.BindingFlags.InvokeMethod |
                                                          System.Reflection.BindingFlags.Public |
                                                          System.Reflection.BindingFlags.SetField |
                                                          System.Reflection.BindingFlags.SetProperty |
                                                          System.Reflection.BindingFlags.Static |
                                                          System.Reflection.BindingFlags.NonPublic;


public static T GetMemberWiseClone<T>(T ToClone)
{
    T Result = default(T);

    if (ToClone != null)
    {
        try
        {
            Result = (T)ToClone.GetType().GetMethod("MemberwiseClone", FullAccess).Invoke(ToClone, new object[] { });
        }
        catch { }
    }

    return Result;
}


All such small things just make me like, microsoft why do u hide
certain things, why do u make some things less accessible or unimplemetable
or is it just me?
AnswerRe: Do u find c# descent? Pin
BobJanova11-Apr-12 5:21
BobJanova11-Apr-12 5:21 

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.