Programming in .Net

Discussion in 'General PC Help Center' started by JustinW, Dec 10, 2008.

Thread Status:
Not open for further replies.
  1. mqudsi

    mqudsi Mostly Harmless Staff Member

    Joined:
    Apr 5, 2006
    Messages:
    14,281
    Likes Received:
    27
    Trophy Points:
    48
    Location:
    Chicago
    No, it has nothing to do with the Add/Remove Entries window. That's set in the registry.
     
  2. JustinW

    JustinW Super Moderator Staff Member

    Joined:
    Apr 21, 2008
    Messages:
    4,375
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Phoenix, AZ US
    Figures. So whats it there for than?
     
  3. JustinW

    JustinW Super Moderator Staff Member

    Joined:
    Apr 21, 2008
    Messages:
    4,375
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Phoenix, AZ US
    Heh. I guess its just there for about forms that load its value onto a label...

    What reg subkeys/values would I need to create/modify so it shows up in add/remove programs with the desired effect?
     
    Last edited: Apr 11, 2009
  4. mqudsi

    mqudsi Mostly Harmless Staff Member

    Joined:
    Apr 5, 2006
    Messages:
    14,281
    Likes Received:
    27
    Trophy Points:
    48
    Location:
    Chicago
    Have a look at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
     
  5. JustinW

    JustinW Super Moderator Staff Member

    Joined:
    Apr 21, 2008
    Messages:
    4,375
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Phoenix, AZ US
    So if I built the project the sub keys [xxxx] and required properties are auto-generated? How could one retrieve the sub-key that belongs to that patiular application in code to manipulate its values (like DisplayName, DisplayVersion, etc)?

    Edit: I scrolled down lower to see keys with the names of some of the applications I got. What's the purpose of keys like [fdfdfsd-dfsdf...] though for some applications? Security through obscurity?
     
    Last edited: Apr 12, 2009
  6. mqudsi

    mqudsi Mostly Harmless Staff Member

    Joined:
    Apr 5, 2006
    Messages:
    14,281
    Likes Received:
    27
    Trophy Points:
    48
    Location:
    Chicago
    It's called a GUID and it's purposely long and random to ensure that no two apps have the same ID which is used by the OS to reference the assembly (so it needs to be unique).

    Think of it as your applications' fingerprint.
     
  7. JustinW

    JustinW Super Moderator Staff Member

    Joined:
    Apr 21, 2008
    Messages:
    4,375
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Phoenix, AZ US
    Ok its making perfect sense now, sorry about that. I'm still learning a lot everyday lol
     
  8. mqudsi

    mqudsi Mostly Harmless Staff Member

    Joined:
    Apr 5, 2006
    Messages:
    14,281
    Likes Received:
    27
    Trophy Points:
    48
    Location:
    Chicago
    No problem. :smile:
     
  9. JustinW

    JustinW Super Moderator Staff Member

    Joined:
    Apr 21, 2008
    Messages:
    4,375
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Phoenix, AZ US
    Ok, so I might have time in a few weeks so I'm thinking about learning C#. I'm going to reference Techotopia's online book for this though by all means post some other places if you know of any. I think I got a class coming up for it that I might not take if I learn it on my own, but I figure it shouldn't be that difficult because other than getting down the syntax it still uses the same .net namespaces, right?
     
  10. JustinW

    JustinW Super Moderator Staff Member

    Joined:
    Apr 21, 2008
    Messages:
    4,375
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Phoenix, AZ US
    Hmm, the first console application shown had this line:

    System.Console.WriteLine ("Hello World");

    So C# does use 'em. Great :smile:

    The online book I'm talking about by the way is here for anyone else looking to take on programming in C#.NET.
     
  11. JustinW

    JustinW Super Moderator Staff Member

    Joined:
    Apr 21, 2008
    Messages:
    4,375
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Phoenix, AZ US
    C#'s not as easy to transfer to as I thought. I'm doing a fun little console application that creates two string collections that reference a single array (one for names and one for colors), assigns the string values, and than finally outputs each person's favorite color to the console. I did it first in VB and its working fine:

    So basically when I run the app, I get two lines:

    Jim likes Blue
    Jack likes Black

    I seem to be having trouble with C# array declarations of a custom type (in my case a structure). Anyone know what I'm doing wrong here? C# version:


    Addendum:


    Never mind, found the solution:

    Lists[] NewLists;
    NewLists = new Lists[2];

    OR

    Lists[] NewLists = new Lists[2];

    Declaration of the array without a size won't give me errors and I dont have to declare a new instace for each new Lists structure individually in C# (can remove the new instance lines for Lists that appear after the declaration thanks to this).

    Hopefully this well at least help someone else :smile:
     
    Last edited: May 12, 2009
    mqudsi likes this.
  12. Ex_Brit

    Ex_Brit Life's a glitch.... Staff Member

    Joined:
    Jun 19, 2006
    Messages:
    3,679
    Likes Received:
    12
    Trophy Points:
    38
    Gender:
    Male
    Occupation:
    Air Canada (Rtrd: 2001)
    Location:
    Toronto
    This thread is 8 years old - locking.
     
Thread Status:
Not open for further replies.

Share This Page