csharp

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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]...
  11. 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
  12. 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...
  13. 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...
  14. 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...
  15. 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
  16. 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...
  17. 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 {...
  18. M

    Resolved SqlException: Cannot insert explicit value for identity column

    How do you populate a database with multiple records from a REST API call? I'm trying to populate information from a REST API into my MS SQL database. I'm actually rebuilding on .NET Core from an original Framework project. Using the National Park Service REST endpoint. public async Task...
  19. M

    MVC to MRC (Model Razor Controller)?

    I've been trying to learn .NET Core after first learning the Framework structure. I am still learning regular views, which utilize Razor code, but I'm coming across a lot of Razor page info. Is it now, or will it ever be a structure of Models, Razor Pages, and Controllers? -A curious learner.
  20. A

    Question What is wrong on function ExecuteNonQuery to work as Best Practise ?

    I work on c# app I need to make function make insert data or update or delete dynamically so that I do function below for insert or update or delete but I don't know what must added or remove from function below to make function work as best practice . public static async Task<int>...
Back
Top Bottom