csharp

  1. 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
  2. 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...
  3. 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...
  4. 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...
  5. 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
  6. 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...
  7. 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 {...
  8. 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...
  9. 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.
  10. 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>...
  11. A

    Question How to create excel sheet with multiple sheet name based on modules ?

    I work on c# desktop app I cannot export data to excel sheet with multiple tab meaning multi sheet based on data exist on data table module field I use open XML library Data table data as below : Divide Output Excel File To Multi Tab based On Module PartId Company Files Tab Module 1222...
  12. M

    Answered Publish .NET Framework on Azure Still Possible?

    I've been trying to launch a .NET Framework web application to Azure, and I can't seem to get it. Every tutorial out there is using, or pushing .NET Core. This is a basic application using C#, .NET Framework 4.7.2 MVC, and connecting to some REST APIs. 1. When deploying .NET Framework app, do...
  13. I

    Is "sealed" necessary and when?

    Hi, everybody. This operator is used so that it cannot be inherited from the class. But in the example of Unity, they had the Application class "sealed", and then in the new versions they just made the class Application. As I understand it, they did so that they could extend the Application...
  14. F

    Question Parallel class to modify flickrviewer app

    You are asked to use Parallel class to modify FlickrViewer app by adding image resizing functionality. More specifically, resize found image(s) and save these resized image locally. You can find the details about how to resize the image from Basic Image Manipulation in C# Here is the link to...
  15. Duvyanshu

    Answered Why am I unable to locate font files(.ttf) in unity android game in persistentDataPath?

    Can somebody guide me in the right direction? My android game that I made on unity 2018.4.9 using C# on VS 2017 is unable to detect files at persistent data path. The two font files are located in the persistent data path directory. This is a screenshot of app persistent data folder. This is...
  16. T

    Debug-Only Code Without Duplication

    I'm trying to write something similar to the existing Debug class that allows clients to explicitly verify pre- and post-conditions of their methods. For example, to check a precondition that the input variable to a method is not equal to 0, one would use Expects.IsGreaterThan(input, 0), and...
  17. D

    Tip Free Tool for learning C# concepts and vocabulary

    I’ve uploaded an Excel workbook of mine to Google Drive that serves a couple of purposes that I believe you'll find useful. 1. It currently lists 726 terms that have some correlation to C#. It's a glossary of sorts with embedded links that lead you to that specific term. It covers all the C#...
  18. J

    Azure SDK for .NET: Story about a Difficult Error Search

    When the PVS-Studio team decided to search for errors in the Azure SDK for .NET project, they were pleasantly surprised by its size. “Three and a half million lines of code,” they kept saying, studying the project’s statistics. There might be so many findings. Alas and alack! The project turned...
  19. D

    Is anyone here using C# for Data Analysis?

    Hello, I was wondering if anyone here using C#/.NET for data analysis ? i would like to hear their best practices. I know there are some more popular (or better?) options like Python or R out there but i would like to use C# to improve my knowledge on that more instead of learning something...
  20. smokereaper98

    unity slide to resize square

    lets say i have a square 2x2. when i slide my finger upwards i want it to get bigger in the Y axes and smaller in the x axes..and when i slide my finger down i want it to get smaller in Y and bigger in X. i have some code but i dont like how it works. can someone help me to create something better?
Top Bottom