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
  • help about clipboard

    csharp help tutorial question
    5
    0 Votes
    5 Posts
    0 Views
    H
    thanx all for assisstance
  • Web Services

    csharp visual-studio wcf sysadmin help
    2
    0 Votes
    2 Posts
    0 Views
    P
    Hi Dave, I think your problem is that you want to be running IIS on your web server with your .asmx web service file. As stated in VS.NET help if you bypass IIS and ASP.NET "you will just see the plain text in the .asmx file" when viewing a .asmx file in a browser/VS.NET. Hope this helps, Paul Paul Hutchinson IT Consultant/Analyst Programmer
  • Detecting when a MdiList Child MenuItem is selected

    question help
    2
    0 Votes
    2 Posts
    0 Views
    T
    You need to add the following event to your parent form: this.MdiChildActivate += new System.EventHandler(this.Form1_MdiChildActivate); then here is the code for the handler. private void Form1_MdiChildActivate(object sender, System.EventArgs e) { MessageBox.Show (this, sender.ToString()); } HTH
  • Using Activator.CreateInstance()

    tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    M
    Hi James, I rebuild the solution, but the problem remains the same. But I found that there was an error in the constructor. I believed that I can break into the constructor from the call to CreateInstance() which was wrong. So I called New() directly and found the mistake. Thanks for your help! Michael
  • C# singleton

    question csharp
    3
    0 Votes
    3 Posts
    0 Views
    O
    Here is a really good article on the Singleton Design Pattern. Is show it in C++ and then the code convert as is to C# and then a better way of doing it in C# that takes advantage of the language. The C# way is easier. Take a look at the URL http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/singletondespatt.asp Odis Wooten odis@msn.com
  • .NET Collections

    question csharp java dotnet oop
    4
    0 Votes
    4 Posts
    0 Views
    J
    mohn3310 wrote: Normally we would create wrappers to ArrayLists or LinkedLists to make them typesafe (using our own classes) rather than using Objects. Microsoft has made that part easier on us developers :) Collection Generator for .NET 1.0 creates a collection based on ArrayLists to store objects of a specified type. Until .NET supports generics this is the best solution to it. James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978
  • Intercept up and down arrow keys in datagrid

    question help
    6
    0 Votes
    6 Posts
    0 Views
    J
    It'll make it so the Key* events won't fire when an arrow key is pressed but try moving the base.OnKeyDown call so its only called if the key wasn't an arrow key. It could also be that the TextBox inside the cell is trapping those keys; so you're seeing the behavior of the TextBox and not the datagrid. James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978
  • #Speed

    csharp performance question
    4
    0 Votes
    4 Posts
    0 Views
    J
    IL executes at roughly 80-90% the speed of C++ because it is native code, not interpreted like Java. James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978
  • 招标:用C#实现MSHFlexGrid

    csharp com
    6
    0 Votes
    6 Posts
    0 Views
    J
    You don't miss a thing, do you Nish? :) - Jason Do you have a Pulse? SonorkID: 100.611 Jason
  • when will the JIT run?

    csharp c++ dotnet question
    3
    0 Votes
    3 Posts
    0 Views
    L
    Thank you, very helpful. well, I find it now -- ngen!
  • FTP Upload and Download

    help question
    2
    0 Votes
    2 Posts
    1 Views
    S
    I found a sample code here: http://home.wi.rr.com/skulkarni/FTP/FTPIndex.html rgrds Martin
  • C# properties

    question csharp
    3
    0 Votes
    3 Posts
    0 Views
    S
    In your example there is only ONE real member variable: name. Indeed, "Name" just exists just for aesthetic reasons. Your example doesn't yet show the advantages of using Properties. These arise if you add e.g. bounds-checking code to your get and/or set accessors. Sito Dekker
  • textbox and button

    learning csharp question
    7
    0 Votes
    7 Posts
    0 Views
    M
    Thanks,that works Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
  • DllImport and parameters

    json question
    2
    0 Votes
    2 Posts
    0 Views
    J
    There are two different versions of GetPrivateProfileString, one for ANSI strings and another for wide/Unicode strings; so you'll need to specify that. Your destination buffer should also be a StringBuilder rather than a string. There is a utility posted on GotDotNet that will generate the correct DllImport statements for you. You need a copy of the win32api.txt from VB6 though. HTH, James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978
  • 0 Votes
    2 Posts
    0 Views
    G
    DataRow does not have any public constructors, therefore your cannot derive a new class from it. This situation exists for many classes in System.Data and System.Xml namespaces. Greg
  • C# and .NET books

    csharp question learning
    16
    0 Votes
    16 Posts
    2 Views
    A
    C#: -Programming C#, Jessy Liberty.: ISBN 0596003099 -C# and the .Net Platform : ISBN 1893115593 .NET -.NET Framework Essentials, 2E : ISBN 0596003021 I prefer bookpool, ( www.bookpool.com)( Save some money here) You can preview books @ http://safari.oreilly.com Cheers Candy
  • Errors & Exceptions in C#

    csharp tutorial
    3
    0 Votes
    3 Posts
    0 Views
    L
    Every time you access Name within your getter or setter code, you recursively invoking it. It stops only when this call sequence exhaust the call stack. You can check it tracing execution in debugger. There are to possible ways to correct this. First is to just create the field: public string Name; // all problems gone the second one is to back up your property with the private field and use in getter and setter code: private string name; // lowercase n public string Name { get { return name; } // you are noo more recursively accessing getter here set { name = value; } // same for setter } Cheers, elk.
  • Show ContextMenu in Node

    help question
    3
    0 Votes
    3 Posts
    0 Views
    T
    I have solved the problem. Anyway, thank you for your helpful code!!:cool:
  • How to sublass visually a C# class

    tutorial csharp question
    10
    0 Votes
    10 Posts
    0 Views
    J
    JerzyPeter wrote: I'm scared to write to you again but belive me it still doesn't work for me. Nah don't be scared, I don't bite :) I'm curious as to why it isn't working for you when I have no problems doing it. JerzyPeter wrote: My Microsoft .NET framework is 1.0 ver. 1.0.3705, Development Environment 2002 ver. 7.0.9466 Same versions I'm showing. Did your box have another version of .NET on it before (one of the betas or an RC)? I repaved this one about 2 weeks ago. Funky things happen when you mix a pre 1.0 beta with the final :-D JerzyPeter wrote: Btw: I found another way of subclassing (but still only in your project): you can 'Add New Item' and choose Inherited Control and select base ExtendedUserControl for example. Yeah, I forgot about that one. I was thinking it was only there for forms. :) James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978
  • ProgressBar (Colors)

    help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied