Most voted ".net" questions

The Microsoft . NET is a set of libraries and functions that are part of the Basic Class Library (BCL), such as user interface functions, data access, connectivity, cryptography, web development, mathematical algorithms, and network communication.

Learn more…

2,689 questions

Sort by count of

  • -1

    votes

    1

    answer

    61

    views

    Error in dependencies

    Hello, I’m starting to develop a web application with . Net CORE. have installed the . Net Core SDK 2.2.103 and when I open my project, I have some errors in the dependencies as shown below: This is…

  • -1

    votes

    1

    answer

    79

    views

    How to close an Excel application in C #

    I have this c# function that converts an excel file into another excel format, the problem is that when the application runs it does not end with the _app quit function.(); The excel application is…

  • -1

    votes

    1

    answer

    52

    views

    Date Input returning Time along with date

    Example: I’d like you to return only to Data, but I don’t know what to do! My code: [Display(Name = "Data de Nascimento")] //[DataType(DataType.Date)] //[DisplayFormat(ApplyFormatInEditMode = true,…

  • -1

    votes

    1

    answer

    155

    views

    Json does not exist in the namespace *using System.Runtime.Serialization.Json*

    An error occurred while trying to import using System.Runtime.Serialization.Json. How to solve? The code converts Json to Object and vice versa, I’m only posting a part of it. using System.Text;…

  • -1

    votes

    1

    answer

    92

    views

    Running async method on Load

    I have a method void that performs a procedure in the database and has no return, call this method in the load of the form, however when the procedure delays the program. How do I pass this method…

  • -1

    votes

    1

    answer

    45

    views

    Decode does not work

    I’m using the htmlagilitypack, where a url extraction is done inside a div, the problem is that it is not correctly bringing the encoding. Request from. net: string requisita = new…

  • -1

    votes

    2

    answers

    700

    views

    Line break in CSV file causes error during import

    The application needs to read a . csv file that is automatically generated by an external application (We have no control over this). The file . csv has 60 "columns" (after reading and separation of…

  • -1

    votes

    1

    answer

    102

    views

    Circle area application: method shows that not all code paths return value

    I have a code that performs the calculation of the area of the circle on three insatiated objects in AppCírculo, only that the method getArea() that should return the area of the circle with the…

  • -1

    votes

    1

    answer

    164

    views

    Html Agility Pack C#

    I’d like to know how the // in the Html Agility Pack. Well, the doubt is the following, code: var t = htmlDoc.DocumentNode.SelectNodes("//table[@class='" + attr +…

  • -1

    votes

    2

    answers

    991

    views

    Transform matrix into vector

    I am doing some exercises with matrix and array, and I arrived at the following situation: static void Main(string[] args) { int linha = 3; int coluna = 3; int[,] matriz = new int[linha, coluna];…

  • -1

    votes

    1

    answer

    204

    views

    Pagination with search

    I am trying to create a search in a grid with paging, but when it brings the search result it generates a new pagination but when I click on page 2 it brings all the results ignoring the search and…

  • -1

    votes

    1

    answer

    166

    views

    Asp.net core User Authentication and Authorization

    Hello, I have the following conceptual and architectural problem of an application. -Scenario: There is an application that has user table, user permissions and user groups already defined in the…

  • -1

    votes

    2

    answers

    31

    views

    Code problem probably coming from Sqlserver

    I’m trying to create a very simple login system, I’m new to programming and I’m still learning and I came across a mistake, The compiler does not present any errors however when running and trying…

  • -1

    votes

    1

    answer

    142

    views

    Error saving Decimal value with . Net Core and Mysql

    In my project I have a field Valor of decimal type, as I set up the culture for en in my project I need to send the value with the tab ",". If I define the input as text does not accept sending with…

  • -1

    votes

    1

    answer

    194

    views

    C# Double Type Precision Loss

    Hello! I wrote a program in C# that converts the decimal separator from a comma string to a dot. For this, I used the Replace() method. The problem occurs when I try to convert the number (now with…

  • -1

    votes

    1

    answer

    481

    views

    How to return data in JSON format from a Webapi . net

    I’m making a call inside the API to return consumer data, but I would like to know how to return this data to the client in JSON format. My controller: [System.Web.Http.HttpGet] public async…

  • -1

    votes

    1

    answer

    48

    views

    Displaying SQL Server data in Windows Forms

    I am wanting to display the information of certain person I am looking for in the SQL Server Database on a label in Windows Forms, but when I run the code it displays…

  • -1

    votes

    2

    answers

    63

    views

    Deserialize XML for object comes with null information

    I am having trouble trying to deserialize an XML returned by the webservice to an object in my project, what happens is that the object is created, but with all properties without value (nulls). The…

  • -1

    votes

    1

    answer

    27

    views

    Move form control with Thread

    I’m trying to make a little 2D game, in it when the character moves the walls also move in a way that looks like some kind of game, however using timers would be a bad idea because when I add too…

  • -1

    votes

    1

    answer

    120

    views

    System.Data.Sqlclient.Sqlexception: 'Incorrect syntax near 'messaging'. '

    I tried everything, changed the codes, changed several things but the error prevails. Code: class Program { public static void Main(string[] args) { List<string> listaProcesso = new…

  • -1

    votes

    2

    answers

    105

    views

    C# calculator not working

    I created a method that asks the user to type numero1 and numero2 (is a simple calculator algorithm), but this method does not store what the user types, regardless of the operation option the user…

  • -1

    votes

    1

    answer

    24

    views

    Model does not recognize the Datetime format

    Hello, I am creating a program to learn a little more about . NET C#, this project is a simple CRUD project. But I have a problem in my model, when I run the program to create a new record it is…

  • -1

    votes

    1

    answer

    60

    views

    Create Zip files and unzip using . NET 3.5

    I’m making an online installer for my Github program, I made a Form with some basic controls. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using…

  • -1

    votes

    1

    answer

    30

    views

    Dropdown Blazor

    How do I dropdown Sub Categories to bring the data according to what I chose in the categories table ? I can only pull from the database but I don’t know how I do the sub-category pull from the…

  • -1

    votes

    1

    answer

    45

    views

    How to popular a class with a C#string list

    On the system I’m developing I send a select with multiple options to a list of string type in my controller, I now need to link this list I get from the view to the list with the login class I have…

  • -1

    votes

    1

    answer

    60

    views

    Error when serializing JSON in C#, apparently the API returns different structures depending on the object’s completion

    I’m having problems returning a third party API (I don’t have access to the code) that I’m consuming, more specifically in the section below: var result = client.SendAsync(request).Result; var…

  • -1

    votes

    1

    answer

    33

    views

    How to use in a string that contains double quotes in its contents along with the @marker

    I am creating a simple unit test that compares two strings and would like to use the marker @ to leave the contents of a string formatted in several lines as follows: var esperado =…

  • -1

    votes

    0

    answers

    20

    views

    Exception on the Httpresquest

    I am developing a login system for my app made in windows Forms. I created an API that works normally by Swagger, but when I try to request a request from my system for the API an error occurs. I…

  • -1

    votes

    0

    answers

    12

    views

    I cannot convert a file to ocr with itextocr

    I’m trying to create a program that applies ocr to a non-ocr pdf, using the library Itextocr in the .Net. It turns out I’m having the following error: "Pdfparser.exe" (CLR v4.0.30319:…

  • -2

    votes

    4

    answers

    2549

    views

    How can I automatically download PDF from a web page

    Is there any way to download a PDF embed on a web page? I am currently using the control WebBrowser.ShowSaveAsDialog() (Save As) but need to do without it, automatically using C# Windows Forms My…

  • -2

    votes

    2

    answers

    169

    views

    What language to study?

    Following people, I am doing the 2nd semester of the course of Information System and I am in a great doubt of which language dedicate myself to learn! I would like to know what was the first…

  • -2

    votes

    2

    answers

    579

    views

    Exception of type System.Nullreferenceexception

    Soon after login in the system I try to access a page and the system sends me again to the login page and soon after the login again held happens this exception: "An Exception of type…

  • -2

    votes

    1

    answer

    867

    views

    Return of Json

    I still don’t understand how JSON works, but here I have a Controller code that returns a JSON and I want to know how to display this data on the screen. public ActionResult ShowPlaylists() { if…

  • -2

    votes

    2

    answers

    124

    views

    Remove half of the file name

    I have a page to pick up a path, which is the Folder Browser Dialog and the path that is saved is like this : "C: ana Updates 2017 2017_04\" I wanted to go through the path, save only the result in…

  • -2

    votes

    3

    answers

    323

    views

    How to prevent a System.Nullreferenceexception within an if

    I’m developing a web application where a photographer does upload of an image. After uploading the image, I will scan the entire Metadata in order to capture some information from directories (Exif,…

  • -2

    votes

    2

    answers

    485

    views

    How can I call a class void method to display an msg in a form

    I have a method public void listarProduto(). It needs to have all the user input information. My problem is time to call this method within a MessageBox() in the form for the message to be…