Search:

Type: Posts; User: Pete_O

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,698

    From MSDN

    Here's some info from MSDN that might help.

    http://msdn2.microsoft.com/en-us/library/system.security.principal.windowsprincipal.isinrole(VS.71).aspx


    [C#]

    public static void...
  2. Replies
    2
    Views
    2,008

    Reflection is the answer

    I think the best way is using Reflection.


    using System.Reflection;
    Assembly myAssembly = Assembly.LoadFrom(MyAssemblyName);

    Or


    using System.Reflection;
  3. Replies
    4
    Views
    2,661

    Another way...

    Or if you just don't want your variables cluttering up your screen because you have so many, you can:


    Declare regions, #region regionlabel and #endregion in C#
    Declare your classes as Partial...
  4. Replies
    2
    Views
    4,880

    Thanks

    Nice article, thank you.

    I've got it working now.

    Pete
  5. Replies
    2
    Views
    4,880

    ADO .NET and Excel in C#

    I'm having trouble loading Excel data into my application. Can anyone tell me what's wrong with the following method?

    My connectionString is:


    private static string connectionString =...
  6. Replies
    2
    Views
    9,467

    DrawMode

    Probably the best way to do it is to draw the added items yourself.

    http://www.codeproject.com/cs/combobox/colorlistbox.asp?df=100&forumid=4004&exp=0&select=196903

    Regards

    Pete
  7. Replies
    2
    Views
    1,688

    Assign a new Font

    Hi,

    You can assign a new Font to the Label1.Font property like this:


    label1.Font = new Font(label1.Font, FontStyle.Bold);

    :)

    Regards
  8. Replies
    1
    Views
    2,107

    Clarification

    Oh by the way I realise there's the Application.Exit(); function but what I'm after is how to access the controls/form on the derived instance.

    Example - how would I rename a label on the derived...
  9. Replies
    1
    Views
    2,107

    Closing all forms from a derived form

    Is it possible to inherit from a form and in that new derived form close ALL forms?

    So in the derived class you would have something like:


    protected sealed override void Exit(object sender,...
  10. Replies
    5
    Views
    7,338

    Compiling

    Thanks, you're right. A friend has told me that the (decimal)(1.23) is compiled at runtime, whereas the Convert.ToDecimal method is determined at compile time.

    Perhaps the performance of...
  11. Replies
    5
    Views
    7,338

    Convert.ToDecimal vs (decimal)

    Hello everyone,

    First post :)

    Anyone know the difference between the following two ways to cast one type to another?


    decimal myVar = Convert.ToDecimal(1.23);

    and
Results 1 to 11 of 11