Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Discussions

PerfectPhase PerfectPhase "This is not war, this is pest control!" - Dalek to Cyberman
  • Problems with const in c#

    Yggdrasil wrote:
    Arran wrote:

    Well it will only apear as a static field if you set it to static.  If you dont set it to a static field then you have to create a instance of the object to access the const.



    AFAIK, 'const' is translated, in IL, into 'public static literal'. Should work either way.



    That's what I thought as well and appears to be the case.

    .class public auto ansi beforefieldinit EmailTypes
          extends object
    {
          .method public hidebysig specialname rtspecialname instance void .ctor() cil managed
          {}
    
          .field public static literal string SalesOrderAck = string("SalesOrderAck")
          .field public static literal string SalesQuoteAck = string("SalesQuoteAck")
    }
    
    Anyway, it's working again now, no idea why, looks like the compiler got confused or something.

    Thanks anyway,

    Stephen 

  • Problems with const in c#

    Arran wrote:

    Well it will only apear as a static field if you set it to static.  If you dont set it to a static field then you have to create a instance of the object to access the const.



    No, infact

    public static const string SalesOrderAck = "SalesOrderAck" ;

    generates a compiler error.

    Stephen.

  • VS 2005 log In Components

    littleguru wrote:
    I'm not a big fan of the login components that come with ASP.NET 2.0 and the whole user management that comes with it.

    It does not fit my goals. They create some kind of access database where you store the information. I could not figure out how to use objects to store the information, or a custom framework to get the information or store it...


    I usually program them by myself, since it is not a big work.


    They use the 'provider' model to access the database, so you 'only' need to write a provider to make the UI work with your database.

    http://www.15seconds.com/issue/050216.htm

    (Page takes a few seconds to load, looks like there is nothing there for some time..)

    I have the same dilema at the moment, I have a suite of membership controls and I can't decide if I should dump my UI and write a membership provider or spruce up the UI componets with that nice expand to template functionality.  I should add this is my 'learning' site so I might end up doing both Smiley

    The thing that bugs me about the MS controls is the data access and logic are in the same class, so if you want to simply move to MySql but keep the schema you have to re-write both parts.

    Stephen. 

  • Problems with const in c#

    ZippyV wrote:
    Did you create the class as:

    EmailTypes et = new EmailTypes();


    Nope, no instances are ever created, the const appears as a static field on the object.

    Now as an experiment, I moved the class into the ASP.Net project and have no problems accessing the const fields!?!

    Stephen.

  • I Fully Support Mr. Grimes, .NET is NOT the right technology for US as a C++ programmer

    leighsword wrote:


    1.the source code is not safe enough(easy to decompile).

    i am prepare study J2EE, and throw .Net into a garbage bin(trash can).


    http://www.google.co.uk/search?hl=en&q=java+decompiler&meta=

    Stephen.

  • Problems with const in c#

    I have a class library being accessed via a ASP.Net app.  In the class library I have this class

    public
    class EmailTypes
    {
       public const string SalesOrderAck = "SalesOrderAck" ;
    }

    The when the ASP.Net calls a into another class in the class library which uses this value I find that EmailTypes.SalesOrderAck is null!  How can this be, it's a constant, it should always be valid!  Does anyone know when this value should get assigned?

    If I change the definition to public static readonly string it works.

    Thanks

    Stephen.

  • We're on Titan!

    manickernel wrote:

    Edit: Just wish the battery would have lasted longer, seems like a good platform for a Plutonium power source. Oh well, looking for one of those for my laptop too... and maybe next time they can figure a way to pull in all that methane and set up a self-sustaining power supply.


    RTG's (Radioisotope Thermoelectric Generators) have been used in many missions such as Galileo, Ulysses, Apollo, Pioneer, Viking, Voyager and Cassini (3 RTGs) but now one has yet flown a fission based device, though there is talk of one, Project Prometheus leading to the JIMO (Jupiter Icy Moons Orbiter).

    This is quite a good link http://www.nuclearspace.com/

    Stephen.

  • We're on Titan!

    Charles wrote:


    We need to go back to Titan with rovers. Do you think we can get Paul Allen to help fund this endeavour? NASA will drag its heavy feet...

    Charles


    I think a little submersible would be really cool, but that plan has been slighlty thawted buy the fact that the surface apears mostly solid Sad

    It would be really interesting to see some real private money pumped into another mission.  If you could find someone to launch it a nuclear power plant coupled to an ion propulsion system would massively cut down the time required to get to the outer plants.

    Been following this mission quite closley over the years, as one of my profs at university, John Zarnecki, was overseeing the construction of the SSP while I was at UKC so I was delighted when it all worked as planned! 

    Stephen.

     

  • We're on Titan!

    dnrfan wrote:
    All that FN wasted money !!

    Could of been spent on cancer/diseases research.

    We have the technology to send crafts to outerspace and land on planets and moons, but we can't cure illnesses that kill people everyday.


    I hate this attitude, you might as well put all your money into curing world hunger, that will save may more lives than any cancer/diseases cure.

    Pick your battles, but don't forget to have some fun along the way or what's the point?

    Stephen

  • Patch Day - No patches?

    http://www.microsoft.com/technet/security/bulletin/advance.mspx

    Stephen