csharp

  1. laves

    Tip Adding an offline voice interface to a cross-platform .NET GUI

    For those who want to dive deeper, here's a tutorial I wrote and the source code! Here's a little tutorial about how I added a voice interface to a cross-platform desktop app: For those who want to dive deeper, here's a tutorial I wrote and the source code! In a world where developers are...
  2. Sajo

    Resolved What an exception class should contain?

    I am currently learning to create my own exception class and am wondering what my exception class should contain? It confuses me a lot. If anyone can give me an example. I need help urgently
  3. X

    Resolved OOP project help and info needed

    Hello I got an mock exam to practice, my real exam is in two weeks. I'm studying to become a teacher (this is an extra class I took) but with corona I had so many things to do including internship, etc. So I really I did not have a lot of time to practice C sharp. I only understand the basics...
  4. aadi56

    Resolved Please help me with asp.net and mongoDB

    I am trying to make employee registration page in asp.net with database as MongoDB. What I want to do is to have the unique email id, when a user tries to register with a email id it should show that email id already exists in the database I am not able to figure out how to do this in MongoDB...
  5. shawnhee

    Resolved Minimize Windows Form when Clicked Outside the Application

    I want to minimize my windows form when i clicked anywhere outside it.... But this code will just close the whole program, can anyone help? I want to hide the app to taskbar, and when i press it from taskbar it shows up again....... Here is the code: protected override void...
  6. shawnhee

    Resolved Windows Forms Application overlayed other Application

    My WFA has overlayed other application since i added this code unto it. But i need this code to lock other users from repositioning the form. Please help 🙏 protected override void WndProc(ref Message m) { const int WM_NCLBUTTONDOWN = 161; const int WM_SYSCOMMAND = 274; const int...
  7. A

    Question Text to speech in spanish male in xamarin forms

    Hello I need my xamarin forms application for android and ios to speak with a male voice in Spanish without using third party subscriptions since the customer does not want to pay for them, but is willing to pay if it is a tts (text to speech) for a single fee. at the moment i have tried with...
  8. Foxster

    Answered Need help with problem solving

    I made a simple BlackJack game, text only, betting is done IRL, no doubling, splitting or stuff like that. It's working nicely and i'm kinda proud, but there's one function that I don't know how to implement. In BlackJack, the aces are worth 11, unless you would get bust, then they're worth only...
  9. metal_hard

    Question Calculate the sum of the elements of an array for which a given inequality is satisfied

    Hello, help write a console solution). Create an array with elements, Z_ (k, n) = f (k) + sin (k) * f (k), where n, k = 1… N, N is an integer entered using the keyboard. Function values tmp1 = Math.Abs (Math.Sin ((2 * x) - 1.5) + 3 * Math.Sin ((x * x)) + 2.38); Array value display. Calculate...
  10. Sajo

    Why I should sort elements before using foreach loop in c# ?

    Hello. I read somewhere that before using foreach loop for list elements it is necessary to use the List.Sort method to sort them before using foreach. For example, to print the elements of a list, we need to use this method first, and then the foreach cycle. My question is: why do we have to...
  11. V

    Question Report generation for an api

    Hello Community, I want to get some details from an api. I have called the api and received the response in json format. However, all details are not shown correctly. I need help around this. The result generates values in duplicate and also all results are not getting. All I am doing this for...
  12. Sajo

    Resolved How to find the smallest element in a matrix and the row in which that element is located?

    Hello everybody. I have problem with the task. The task is:" Write a C # program that loads the value of manufactured goods in m manufacturing sectors from users over n months and then determines and prints the month in which productivity was lowest." I realized that productivity is lowest in...
  13. Sajo

    How to calculate determinant of n x n matrix?

    Hello everybody. I create n x n matrix where I must calculate determinant but I don´t know how. Please can you help me? Here is code of my matrix Console.WriteLine("Enter number of rows and columns in your matrix"); int n = int.Parse(Console.ReadLine()); int[,] l = new int[n, n]...
  14. Sriram

    Answered What are all the possible scenario to write nunit test cases for login page

    I don't have idea about unit testing, what are all the possible scenario for test case to be written for a asp.net web application- login page
  15. Sajo

    Resolved Problem with verbatim string

    Hello everybody! I have a problem with verbatim string. I want to write this "c:\\projects\\project1\\enter" I use verbatim string for that. But when I run console it always display me c:\projects\project1\enter. I want to write code which is easier to read. I want double backslash not just one...
  16. D

    I need a c# mentor

    I am really trying to learn c# from Codecademy and I want to start building mobile apps with it. I have gotten to some stage where I understand some things but I really do need a mentor I can always talk to when I have a problem. At the moment, I don’t know what next to do from Codecademy...
  17. M

    Resolved How to Implement DbSet and DbContext in Service-Repository Architecture?

    I am updating my .NET Core web app from just MVC to a Service-Repository pattern. My question is, how do you implement DbSet<> when you add the Service and Repository layers? I originally added these to my ApplicationDbContext file under the Data folder. Is this still correct? Then would I just...
  18. octola

    Use of Microsoft.Office.Interop.Outlook

    Hello, Is it possible to retrieve the structure tree of Outlook (I mean to know which files there are, which subfolders, etc....) ? I don't find clear documentation about how to use the namespace Microsoft.Office.Interop.Outlook. Does someone have some informations ? Sorry for my english
  19. M

    Question Proper Folder Structure

    This might be too broad of a topic, but how are you supposed to set up a file structure when using .NET Core MVC. When creating a new project, you are given the following: >>Dependencies >>Properties >>wwwroot >>Areas >>Controllers >>Data >>Models >>Services >>Views >>appsettings.json...
  20. M

    Question How to Foreach Through ViewModels?

    How do you use a ForEach loop on ViewModels on .NET MVC? I have 2 models: A Park Model: public class Park { [Key] public int ParkId { get; set; } public string ParkName { get; set; } public string ParkState { get; set; } public string ParkLatitude {...
Top Bottom