Skip to content
  • #Script

    The Insider News csharp asp-net dotnet tools
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    8 Posts
    0 Views
    M
    Replace the null with a zero and filter them out in your query. Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP
  • C# error when I try to run

    C# csharp dotnet visual-studio com help
    3
    0 Votes
    3 Posts
    0 Views
    Richard DeemingR
    Member 16073627 wrote: The reference assemblies for .NETFramework,Version=v4.0 ... ndp481-devpack-enu.exe You have downloaded the developer pack for .NET Framework 4.8.1, whereas your error message says your project targets .NET Framework 4.0.0. The page you've linked to doesn't provide a download for 4.0.0; this page[^] explains why: Install the .NET Framework developer pack or redistributable - .NET Framework | Microsoft Learn[^]: Starting with Visual Studio 2022, Visual Studio no longer includes .NET Framework components for .NET Framework 4.0 - 4.5.1 because these versions are no longer supported. Visual Studio 2022 and later versions can't build apps that target .NET Framework 4.0 through .NET Framework 4.5.1. To continue building these apps, you can use Visual Studio 2019 or an earlier version. According to this page[^], if you install VS2019 and select the ".NET 4 multi targeting pack" option, then you may be able to build .NET Framework 4.0 applications in VS2022. Otherwise, you'll need to stick with VS2019. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • Irked! Irked I am.

    The Lounge csharp dotnet linux testing beta-testing
    18
    0 Votes
    18 Posts
    0 Views
    P
    Yes, on MS-DOS there was char 26 (Ctrl-Z) which was an end-of-file marker in at least some cases. Even in the past ten years I've had to deal with char 26 appearing in string values and causing trouble. At most I would use P/Invoke to call the Windows API routines to read the file. And I would implement my own buffering system. Then add layers from there. But that's still just theoretical.
  • 0 Votes
    5 Posts
    1 Views
    J
    I'm beginning to realize that now. If it ain't broke don't fix it Discover my world at jkirkerx.com
  • 0 Votes
    2 Posts
    0 Views
    Richard DeemingR
    There are quite a few problems with the code you've shown. Firstly, your code won't compile. You can't have line-breaks in a standard string. You would need to use either a verbatim string[^] or a raw string[^] for your query. You should make the query a local const so that you're not tempted to try to inject parameter values into it incorrectly and introduce a SQL Injection[^] vulnerability into your code. You seem to be using a shared database connection instance. That's a terrible idea - either your code must be restricted to only service one request at a time, or you'll end up with cross-contamination when multiple users try to access your application, since the connection is not thread-safe. Instead, create the connection when you need it, and wrap it in a using block to ensure it's disposed of properly. Similarly, the SqlCommand and SqlDataReader instances need to be wrapped in using blocks. Your code currently swallows any exceptions, and returns an empty DataTable instead. The caller is expected to examine the Error property to determine whether an error occurred, and retrieve a tiny portion of the details of that error - assuming the property hasn't been overwritten by a call from a different user in the meantime. Instead, you should let the exception propagate to the caller naturally. If you need to add more details, then throw a different exception, making sure to include the original exception as the InnerException. public static DataTable GetAll() { const string Query = """ SELECT ... FROM ... """; try { using (var connection = Connection.CreateAndOpenConnection()) // Make this method open the c
  • 0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    6 Posts
    0 Views
    T
    If you care for compact coding, look a the videos at www.pouet.net - lots of super impressing videos (animations) collected there! Take a look at e.g. Oscar's Chair by Eos :: pouët.net[^]. When you see what these guys manage to do in 4092 bytes, making a "Hello World" using the same amount of space is not quite as impressing :-) To see the movies at pouet.net you have to download the executable, usually wrapped in a zip file, and run it locally. I think they all take over the screen completely when they run. Beware that some videos require quite a few seconds for unpacking and initialization. First time you see the videos, you will be convinced that they download a lot of contents from internet. They don't. Unplug the network cable if you don't believe it! A few other good ones at pouet.net (the 4Kbytes ones is only a small fraction of the collection!): Binary Parasites by Fulcrum :: pouët.net[^] - 4096 bytes (zipping makes it grow to 4101 bytes) fr-013: flybye by Farbrausch :: pouët.net[^] - this one is 65536 bytes, but quite impressing. Skyline by LJ & Logicoma :: pouët.net[^] - 4073 bytes. The Grid 512B by Abaddon :: pouët.net[^] - 512 bytes, if you want it to fit in the directory entry. fr-08: .the .product by Farbrausch :: pouët.net[^] - another "big" one (65024 bytes), really an ad for the company making the tools. Note that some videos at pouet.net are made for non-PC hardware. A few of the old ones require e.g. old dx drivers which you probably haven't got on your PC.
  • 0 Votes
    2 Posts
    7 Views
    A
    Yip, removing the project (or whatever it's called :laugh: ) from the solution and then adding it back will do the trick. I just had to throw this in here lol.
  • 0 Votes
    2 Posts
    0 Views
    N
    The first time I read it: Quote: ...from workflows in Azure Logic Apps, a low-code iPaaSs solution for my inmediate thought... I pass too Kent Sharkey wrote: What's the German word for, "I kind of thought that was the point of the product, but they're only adding the feature seven years after launch"? Deppen? M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
  • WPF .Net Core Dependany Injection Question

    WPF csharp wpf question asp-net dotnet
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    7 Posts
    2 Views
    M
    The classes and functionality from the NuGet package won't be automatically available to the executables (EXE files) that reference this DLL. Each executable project that uses the DLL must also have its own references to the required NuGet packages.
  • 0 Votes
    14 Posts
    0 Views
    P
    Very true Ravi. Our bank (in the UK) used Indian companies a lot. The architect was nearly always a UK bank employee, even if the rest of the development team was in India.
  • 0 Votes
    2 Posts
    0 Views
    N
    Kent Sharkey wrote: T4 CLI FWIW IT "sounds" more like a new car :rolleyes: M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
  • Announcing .NET 8 Preview 5

    The Insider News csharp dotnet com announcement
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    43 Posts
    1 Views
    C
    :thumbsup: cheers Chris Maunder
  • 0 Votes
    3 Posts
    3 Views
    R
    Thanks. Has anyone tried the 3rd party ones like Syncfusion?
  • 0 Votes
    8 Posts
    1 Views
    A
    For Ui/Ux for Backend for Technologies for a Web Application,Contact Mckayne Technologies. Our Expertise in Web Design will see your out of this situation. Mckayne Technologies Ecommerce Website Design https://mckayne.com/web-development Web Design Agency - Ecommerce Website Design, Web Designing Company McKayne is a web design agency & web designing company with a team of creative and talented web developers specialized in web design and development, ecommerce website design. email: develop@mckayne.com Contact: +91-9447520016
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    1 Posts
    0 Views
    No one has replied