Click here to Skip to main content
15,905,682 members
Home / Discussions / C#
   

C#

 
GeneralRe: Find Printer List available... Pin
Stephane Rodriguez.28-Feb-03 20:39
Stephane Rodriguez.28-Feb-03 20:39 
GeneralThank You.. Pin
bania2-Mar-03 13:22
bania2-Mar-03 13:22 
GeneralRe: Thank You.. Pin
leppie3-Mar-03 6:28
leppie3-Mar-03 6:28 
GeneralFew Questions Pin
chito27-Feb-03 20:07
chito27-Feb-03 20:07 
GeneralRe: Few Questions Pin
Brian Olej28-Feb-03 9:45
Brian Olej28-Feb-03 9:45 
GeneralRe: Few Questions Pin
Stephane Rodriguez.28-Feb-03 20:52
Stephane Rodriguez.28-Feb-03 20:52 
Generallame encoding Pin
grv57527-Feb-03 18:25
grv57527-Feb-03 18:25 
GeneralClass Library Question .. Pin
Dato27-Feb-03 14:55
Dato27-Feb-03 14:55 
GeneralRe: Class Library Question .. Pin
David Stone27-Feb-03 15:01
sitebuilderDavid Stone27-Feb-03 15:01 
GeneralRe: Class Library Question .. Pin
leppie27-Feb-03 20:54
leppie27-Feb-03 20:54 
GeneralRe: Class Library Question .. Pin
David Stone28-Feb-03 4:22
sitebuilderDavid Stone28-Feb-03 4:22 
GeneralRe: Class Library Question .. Pin
leppie28-Feb-03 6:02
leppie28-Feb-03 6:02 
GeneralRe: Class Library Question .. Pin
David Stone28-Feb-03 14:13
sitebuilderDavid Stone28-Feb-03 14:13 
GeneralRe: Class Library Question .. Pin
leppie28-Feb-03 22:40
leppie28-Feb-03 22:40 
GeneralThis is an easy one... really! Pin
codeweenie27-Feb-03 14:25
codeweenie27-Feb-03 14:25 
GeneralRe: This is an easy one... really! Pin
Furty27-Feb-03 14:42
Furty27-Feb-03 14:42 
GeneralRe: This is an easy one... really! Pin
David Stone27-Feb-03 14:42
sitebuilderDavid Stone27-Feb-03 14:42 
codeweenie wrote:
string tmp = valNames.GetLength(0); //Cannot implicitly convert type 'int' to 'string' *ERROR*

You're trying to assign an Int32 value to a String. The GetLength method returns "The number of elements in the specified dimension." As a side note, you are only ever going to have one dimension, so you could just use the Length property.

So what you could do is:

RegistryKey regKey = Registry.LocalMachine.CreateSubKey(@"Software\MyTestRegKey");
foreach(string name in regKey.GetValueNames())
{
    Debug.Print(regKey.GetValue(name));
}


[edit]That skips the whole issue of getting the length or working with iterating through the list. It's actually a much better way of doing it unless you need the index of the value in the array later on.[/edit]

any idiot
can write haiku you just stop
at seventeenth syl

-ThinkGeek Fortunes

GeneralTcpClient.Close Pin
monrobot1327-Feb-03 13:51
monrobot1327-Feb-03 13:51 
GeneralRe: TcpClient.Close Pin
monrobot1328-Feb-03 3:18
monrobot1328-Feb-03 3:18 
GeneralRe: TcpClient.Close Pin
James T. Johnson28-Feb-03 4:54
James T. Johnson28-Feb-03 4:54 
GeneralDeploying an app w/ DB connectivity Pin
Eric VanWieren27-Feb-03 12:36
Eric VanWieren27-Feb-03 12:36 
GeneralRe: Deploying an app w/ DB connectivity Pin
Danny Blanchard5-Mar-03 20:38
Danny Blanchard5-Mar-03 20:38 
GeneralWeb service client apps docs Pin
gadgetfbi27-Feb-03 10:21
gadgetfbi27-Feb-03 10:21 
QuestionHow to save the TreeView content Pin
j-hannemann27-Feb-03 9:26
j-hannemann27-Feb-03 9:26 
AnswerRe: How to save the TreeView content Pin
jtmtv1827-Feb-03 11:07
jtmtv1827-Feb-03 11:07 

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.