Click here to Skip to main content
15,889,909 members
Home / Discussions / C#
   

C#

 
GeneralRe: Deleting registry values Pin
Jibesh13-Jan-13 22:32
professionalJibesh13-Jan-13 22:32 
GeneralRe: Deleting registry values Pin
Pete O'Hanlon13-Jan-13 23:40
mvePete O'Hanlon13-Jan-13 23:40 
QuestionIndex was outside the bounds of the array. Pin
Erol230913-Jan-13 4:11
Erol230913-Jan-13 4:11 
AnswerRe: Index was outside the bounds of the array. Pin
OriginalGriff13-Jan-13 4:15
mveOriginalGriff13-Jan-13 4:15 
GeneralRe: Index was outside the bounds of the array. Pin
Erol230913-Jan-13 4:17
Erol230913-Jan-13 4:17 
GeneralRe: Index was outside the bounds of the array. Pin
OriginalGriff13-Jan-13 4:21
mveOriginalGriff13-Jan-13 4:21 
AnswerRe: Index was outside the bounds of the array. Pin
PIEBALDconsult13-Jan-13 4:41
mvePIEBALDconsult13-Jan-13 4:41 
QuestionObject reference not set to an instance of an object Pin
Erol230912-Jan-13 19:25
Erol230912-Jan-13 19:25 
Hello

I am trying to use a method that reads all the values from a subkey but something seems to be wrong...can anyone tell me the corect way to do it?

<pre lang="c#">public string[] ReadValues(string rkey)
        {


            
            RegistryKey key = Registry.CurrentUser.OpenSubKey(rkey);
            string[] VNames = key.GetValueNames();
           string[][] values = new string[VNames.Length][];
           string[] v = new string[VNames.Length];
            for (int i = 0; i < VNames[i].Length; i++)
            {
                
                values[i][0] = VNames[i];
                values[i][1] = (string)key.GetValue(VNames[i]);
                v[i] = values[i][1];

            }
            return v;

        }

AnswerRe: Object reference not set to an instance of an object Pin
Jibesh12-Jan-13 19:41
professionalJibesh12-Jan-13 19:41 
QuestionSaving selected option into database Pin
Oyebisi Jemil12-Jan-13 11:31
Oyebisi Jemil12-Jan-13 11:31 
AnswerRe: Saving selected option into database Pin
Pete O'Hanlon12-Jan-13 11:45
mvePete O'Hanlon12-Jan-13 11:45 
AnswerRe: Saving selected option into database Pin
Dave Kreskowiak12-Jan-13 12:48
mveDave Kreskowiak12-Jan-13 12:48 
GeneralRe: Saving selected option into database Pin
Brisingr Aerowing12-Jan-13 13:49
professionalBrisingr Aerowing12-Jan-13 13:49 
GeneralRe: Saving selected option into database Pin
PIEBALDconsult12-Jan-13 15:22
mvePIEBALDconsult12-Jan-13 15:22 
QuestionBinary Reader Pin
dxtrx12-Jan-13 10:38
dxtrx12-Jan-13 10:38 
AnswerRe: Binary Reader Pin
Jibesh12-Jan-13 13:01
professionalJibesh12-Jan-13 13:01 
GeneralRe: Binary Reader Pin
dxtrx12-Jan-13 13:17
dxtrx12-Jan-13 13:17 
GeneralRe: Binary Reader Pin
Brisingr Aerowing12-Jan-13 13:48
professionalBrisingr Aerowing12-Jan-13 13:48 
QuestionSocket programming- Response to all client Pin
mohammadkaab12-Jan-13 7:36
mohammadkaab12-Jan-13 7:36 
AnswerRe: Socket programming- Response to all client Pin
pt140112-Jan-13 8:21
pt140112-Jan-13 8:21 
GeneralRe: Socket programming- Response to all client Pin
jschell14-Jan-13 8:26
jschell14-Jan-13 8:26 
GeneralRe: Socket programming- Response to all client Pin
pt140114-Jan-13 19:51
pt140114-Jan-13 19:51 
GeneralRe: Socket programming- Response to all client Pin
jschell16-Jan-13 8:53
jschell16-Jan-13 8:53 
GeneralRe: Socket programming- Response to all client Pin
mohammadkaab15-Jan-13 3:15
mohammadkaab15-Jan-13 3:15 
GeneralRe: Socket programming- Response to all client Pin
pt140115-Jan-13 4:01
pt140115-Jan-13 4:01 

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.