Skip to content

C#

C# discussions

This category can be followed from the open social web via the handle c-065f1d12@forum.codeproject.com

93.7k Topics 383.1k Posts
  • ASP.NET

    csharp asp-net question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • CacheItemRemovedCallback Problems

    xml help csharp asp-net sysadmin
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • casting (headaches)

    database help tutorial question
    4
    0 Votes
    4 Posts
    5 Views
    J
    Senkwe Chanda wrote: I thought of that but then thought that TilePlaceControl tpc = (TilePlaceControl)myPanel.Controls[x]; creates a seperate instance of the object and hence, tpc.MyMethod(...) would still not be called on the instance contained by the panel. Nope, tpc is only a reference to the object. A reference is similar to a pointer in C/C++ and ByRef in VB; anything you do to the reference (except assignment) will carry through to the actual instance. Assignment on a reference only makes the reference refer/point to something else, leaving the original intact. The only way to create a new instance is via the new keyword or through reflection's Activator.CreateInstance, neither of which you show here :) James Sonork ID: 100.11138 - Hasaki
  • Instr

    question csharp
    2
    0 Votes
    2 Posts
    6 Views
    J
    use the IndexOf method on your string object. int instr = myString.IndexOf("moo", 0); There are 5 other overloads that you can use as well, 3 to find a string, 3 to find a char. James Sonork ID: 100.11138 - Hasaki
  • obtaining drive information

    workspace
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Win32 APi with C#

    csharp json tutorial question
    4
    0 Votes
    4 Posts
    4 Views
    J
    I believe you could wrap your code with MC++ providing an interface for your dotnet app to work with it. Thats about the extent of my knowledge on MC++ though. :p Perhaps someone with a better grasp could fill you in more? :) James Sonork ID: 100.11138 - Hasaki
  • Function

    data-structures question
    4
    0 Votes
    4 Posts
    5 Views
    E
    It could return object, which could either be a string or an array of string. In general, however, I think that's a bad idea. Why not return an array with a single item for the first case?
  • RegEx question How to string match to New String?

    question regex help tutorial
    2
    0 Votes
    2 Posts
    2 Views
    E
    Use a regex like: @"width=(\d+) type=(.+)]"; if this matches, look in the match.Groups[0] for the first value, and [1] for the second value. You can also use named captures: @"width=(?\d+) type=(?.+)]"; and then use match.Groups["width"] and ["type"]. That really helps the readability of code.
  • Excel COM...

    com help question learning
    2
    0 Votes
    2 Posts
    4 Views
    E
    Use Missing.Value from System.Reflection for parameters that you want to have the default value
  • Automating MS Office97/2000/XP with same C# Code

    csharp wpf wcf tutorial
    3
    0 Votes
    3 Posts
    5 Views
    P
    Thanks for the info. I now have a working solution thanks to .NET 1. Write the base class in C# in a seperate DLL & namespace 2. Derive a new class in VB from the base class in another DLL - I can use Late Binding features of VB to automate MS Office (All Versions) without writing pages of code. 3. Use this new class in the top level program (C#) All Thanks for .NET Man I love .NET :) :) :) :) :) :) :) Peter Tewkesbury Developer ibsl technologies
  • 0 Votes
    3 Posts
    4 Views
    J
    Here's a reply I got offline from the original poster, posted here for archival purposes :) Thanks for the suggestion, but i determined what my error was. I defined my RECT structure incorrectly so that when it was being passed from managed to unmanaged code, it was being marshalled incorrectly. The correct definition of RECT: [StructLayout(LayoutKind.Explicit)] public struct RECT { [FieldOffset(0)] public int left; [FieldOffset(4)] public int top; [FieldOffset(8)] public int right; [FieldOffset(12)] public int bottom; public RECT(int left, int top, int right, int bottom) { this.left = left; this.top = top; this.right = right; this.bottom = bottom; } } Sonork ID: 100.11138 - Hasaki
  • TAPI

    csharp tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Using Fixed Width Fonts like FixedSys, Howto?

    help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Programming C# - O'Reilly

    csharp database com discussion announcement
    3
    0 Votes
    3 Posts
    6 Views
    M
    Nice book, this one is a keeper. Just please don't EVER do one of those "Teach Yourself Particle Physics in 21 Seconds" books again. "Faith is believing in something you know isn't true." - Arthur C. Clark
  • What can C# handle?

    c++ csharp question discussion
    2
    0 Votes
    2 Posts
    3 Views
    N
    Right now you'd be better off with MFC. Maybe 6 months later you might think C# Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
  • Remoting in Win 9x/Me

    question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • al.exe and csc.exe - where to find them?

    csharp visual-studio tools question
    3
    0 Votes
    3 Posts
    4 Views
    C
    Thanks a lot. I quiried only VS.NET directory so I missed them. Regards CK
  • Client code in C++ and Server in C#

    csharp sysadmin help c++ visual-studio
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • How to create a container control

    tutorial docker help
    2
    0 Votes
    2 Posts
    1 Views
    M
    Replace : System.Windows.Forms.UserControl with : System.Windows.Forms.ContainerControl
  • Easy way to maximize a winform?

    question
    2
    0 Votes
    2 Posts
    2 Views
    J
    Use the WindowState property. this.WindowState = FormWindowState.Maximized James Sonork ID: 100.11138 - Hasaki and a digital cookie (not chocolate chip, its computer chip) goes to whoever can be the first to tell me what Hasaki means. I know someone registered on here can tell me :)