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
  • 0 Votes
    4 Posts
    23 Views
    D
    No, static linking is not directly supported. If you want to know why, ask Microsoft. The closest approximation to it is to use ILMerge or similar. Not every library is compatible though, like WPF assemblies or code that uses Reflection. Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
  • 3D графика

    5
    0 Votes
    5 Posts
    22 Views
    Richard DeemingR
    What did you use to translate? Google produces "screw up" instead of "save" for me. :laugh: "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • 0 Votes
    13 Posts
    119 Views
    T
    Thank you so much Dear Ravi Bhavnani, You are truly amazing with very clear and comprehensive ideas, especially that you are not the person who discourages other, rather the person who encourages others to develop himself. I would liked to be in contact with you in private. As far as the analysis is concerned, I've already done the basics and I've also found that it's really a project that will solve several needs specifically in our local community. I'm then looking for the technology that can be best adapted to my project. Thanks again for your suggestions, guides and advice.
  • How to start creating a WinUI project ?

    visual-studio wpf tutorial question
    11
    0 Votes
    11 Posts
    89 Views
    M
    Thanks. I found that I must install "window sdk templates"
  • 0 Votes
    1 Posts
    10 Views
    No one has replied
  • Self referencing loop detected for property with type ...

    help question json
    6
    0 Votes
    6 Posts
    53 Views
    D
    That's not how you do dependency injection. Your Indicator class is useless as it has no way of setting its TradingManager property. Also, the JsonIgnoreAttribute is only useful if you're serializing the Indicator class to a file. I'm leaving the Indicator out of your code. class MyTradingManager : ITradingManager { ... Code to implement the ITradingManager interface ... } internal class SampleIndicator : ExtendedIndicator { private ITradingManager _tradingManager; public SampleIndicator(ITradingManager tradingManager) { \_tradingManager = tradingManager; } ... Code that uses the ITradingManager implementation ... } Note, for this to work, you cannot make SampleIndicator dependent on MyTradingManager. It should take an instance of some implementation of ITradingManager instead. MyTradingManager is that implementation. Whatever code is creating instances of this stuff has to create an instance of MyTradingManager and pass that to the constructor of SampleIndicator: { ... ITradingManager manager = new MyTradingManager(); // Create the dependency SampleIndicator indicator = new SampleIndicator(manager); // Inject the dependency into SampleIndicator ... } Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
  • 0 Votes
    5 Posts
    35 Views
    D
    This should have been in your original question. What you're looking for is called "serialization". This is the process by which an object is written to a form that can transmitted and read by a matched deserializer and can be accomplished using JSON, XML, and Binary serializers. My previous answer still stands for most serialization operations, you still need the public properties, but you do not need to override the ToString method. You can read up on it at Serialization - .NET | Microsoft Learn[^] Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
  • Buy Google Reviews

    code-review csharp graphics business sales
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • How to send property values via eventhandler ?

    question tutorial
    4
    0 Votes
    4 Posts
    28 Views
    OriginalGriffO
    That's because they don't generate keycodes: ALT on it's own does nothing, it needs a keystroke to make it useful - ALT+F2, CTRL+F4 for example. They are MODIFIER keys[^]. "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
  • How to identify Key Combinations ?

    tutorial question
    2
    0 Votes
    2 Posts
    21 Views
    D
    Try reading the documentation on KeyEventArgs Class[^]. You're looking for the Modifiers property. Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
  • Compile/decompile CHM files in C#

    help question csharp html
    3
    0 Votes
    3 Posts
    28 Views
    T
    I don't think you should expect any response from the OP. It looks like his last activity on CP was 11 years ago. I very much doubt that he will read your reply / follow-up question. Religious freedom is the freedom to say that two plus two make five.
  • C# Deserialization of JSON data - date problem

    csharp json php sysadmin help
    1
    0 Votes
    1 Posts
    12 Views
    No one has replied
  • 0 Votes
    1 Posts
    13 Views
    No one has replied
  • 0 Votes
    1 Posts
    10 Views
    No one has replied
  • Read information from serial port in Mathlab format

    sharepoint help tutorial
    17
    0 Votes
    17 Posts
    139 Views
    L
    you're welcome. :) Luc Pattyn [My Articles] The Windows 11 taskbar is a disgrace; a third-party add-on is needed to reverse the deterioration. I decline such a downgrade.
  • MessageBox Appearing Behind Window

    help question
    8
    0 Votes
    8 Posts
    55 Views
    Richard Andrew x64R
    Thanks! I'll try this. The difficult we do right away... ...the impossible takes slightly longer.
  • Debugging the Sandbox

    debugging csharp visual-studio help question
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • Updating sql table where textbox = ID

    database security tools announcement
    4
    0 Votes
    4 Posts
    35 Views
    W
    I don't fully understand what functionality you want to achieve,but based on your code,you can try this: SqlCommand cmd = new SqlCommand("Update [Law_Responses] SET (Calltaker=@Calltaker,Date=@Date,City=@City,County=@County,Address=@Address) where @Columname=@ID", con); cmd.Parameters.AddWithValue("@Calltaker", DropDownList1.SelectedValue); cmd.Parameters.AddWithValue("@Date", TextBox1.Text); cmd.Parameters.AddWithValue("@City", DropDownList9.SelectedValue); cmd.Parameters.AddWithValue("@County", DropDownList2.SelectedValue); cmd.Parameters.AddWithValue("@Address", TextBox3.Text); cmd.Parameters.AddWithValue("@Coumname",TextBox171.text); con.Close(); cmd.ExecuteNonQuery();
  • (Current) AI Rant.

    data-structures csharp visual-studio ai-models ai-coding
    4
    0 Votes
    4 Posts
    38 Views
    L
    Besides AI getting it wrong: 1) If you have concurrent writers to the queue you do not know something else does not insert a new "last" item after you checked what it is. This can of course be solved with some locking, but then we are at the next point: 2) If you do not have concurrent writers you can just capture the last item to a variable as you enqueue it.
  • .NET MAUI 8

    csharp design question
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied