c# .

  1. lcorcoran1

    Send data from C# string object to SQL Server Database

    Hello, I have a console app that calls an API and gets a response in JSON I'd like to the "upload" this json into an existing SQL Server Table. Is this possible?
  2. Samuel David

    Resolved How to view sql command execution with Stored Procedure ?

    Hello Everyone, I have below block of code. private TData ExecuteReturnData<TData>(string procName, Func<IDataReader, TData> translator, SqlConnection sqlCon, params SqlParameter[] parameters) { using var sqlCmd = CreateCommand(procName, sqlCon, parameters); sqlCmd.CommandTimeout=120; using...
  3. Samuel David

    How to write Unit test for DAL which call stored procedure and direct sql commands

    Hello Everyone, I am writing unit test cases(using xunit) for DAL methods(which are calling stored procedures and some direct sql commands and not returning methods). How can I mock the results coming from db in unit tests. public class Notification : Base, INotificationBal { public void...
  4. Samuel David

    Question How to see code coverage result in Visual Studio 2022 professional

    Hello Everyone, I am using visual studio 2022 professional. Used Xunit, wrote unit cases in the project. How can I see the code coverage percentage. Please suggest me. Thanks
  5. Samuel David

    Resolved Unit test project creation dependency injection mocking

    Hello Everyone, Can someone suggest me to create unit test project with mocked dependency injection & other dependencies used in business logic with sample reference. Thanks Sam
  6. P

    How to start to create mp4 class?

    Hi Guys, I want to create my own mp4 class to modify file details(Title,comments,author etc.), but I don't know how to start. Could you expert help me? thank you.
  7. simos-sigma

    Question How can I access the resources of a project through a custom "uitypeeditor" which is located into a control library?

    Hello!!! :) I am trying to make a custom UITypeEditor with a dialog box which will import .svg files into a project or will select one from those already imported, like the Select Resource Dialog Box does with other files. I have managed to make it get the .svg file from a file and then place...
  8. J

    Question How can I get a valid stream from a zip file which contains xml?

    Hi Gents, I have a specific requirement is to get a valid stream(which will be further operate) from given zip path? The situation is use a support code snippet to determine given path is xml/zip file(one of these files inside zip is xml which what I want), if it's a xml then easily get a...
  9. Programmable Physics

    How to know if 2 ASCII created lines in a command prompt has the same length?

    Is there a way to know if these 2 lines have the same size in pixels aka length? What code should I use to determine if they have the same length or not? Just because these perpendicular lines created with ASCII, they differ in length size according to whether they were put next to one another...
  10. Ceh9_N

    How to write simple program?

    The user enters integers from the keyboard (numbers are entered alternately, the user enters a number and presses "Enter"). The sequence of numbers ends by entering the value "0". Count the number of even and odd numbers, number of positive and negative. Requirements 1. set Unicode encoding for...
  11. Celso Calomeno

    Add txt file to a double list?

    If anyone can help me, I'm not able to convert the txt to include in the list string thePath = @"C:\Spectrum.txt"; string seq = File.ReadAllText(thePath); //read the numbers by line string[] text = Regex.Split(seq, "\t"); List<(double mz, double intensity)> ions = new List<(double mz...
  12. K

    OpenSilver 1.1

    Hi Everyone, I am glad to be on this forum with you all, it is always a source of great content and amazing advice. Speaking of which, I wanted to make a quick announcement as I am pretty sure it will be of great interest and value to some of you guys. OpenSilver 1.1 has now been released...
  13. karanugale

    Question Skype Personal integration with C#

    It's been weeks of searching everywhere but couldn't find any help and finally i'm posting my query here. I'm not finding a way to integrate Skype Personal (Not Skype Business/Lync) in my c# application. I just want to receive Skype messages on my application from the skype installed on the...
  14. S

    Resolved Buttons for single row datagridview

    Hello everybody, I would need some help, I'm creating a program, and through the datagridview function I get the data from the mysql database, but I need to be able to add buttons (with images) on some lines. at this moment it adds the button on all lines Example: If the event has associated a...
  15. Khoaaaaaaaaaaaaaaaaaaaaaa

    Question Differences between abstract class and interface?

    Differences between abstract class and interface ?
  16. C

    Question Reasoning on the class call (XAML)

    Hello ! I'm not used to programming GUIs and I'm looking for the most correct reasoning to develop my little application. I need to extract data from an HDF5 file and then call a DLL so technically, my application is not complicated but I'm wondering about the following. Knowing that on my...
  17. O

    Get Data in Live Chart

    I have a table with weather data. The table consists of an ID, the temperature and the date. I would like to have the temperature data to and the respective year in a line chart output. I want to be able to select via a dropdown menu or via a textbox the respective ID, so that for the...
  18. ivanbossa

    I am in dire need of help with a solution

    I would be really grateful!
  19. Daniel_04

    Problem with the convert string to int in Method

    using System; using System.Collections.Generic; using System.Text; namespace ConsoloAPP2._199 { class Product { public int ProductId { get; set; } public string ProductName { get; set; } public int AvailableQuantity { get; set; } public decimal...
Top Bottom