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
-
0
votes2
answers146
viewsC# - Datagridview does not change Defaultcellstyle.Backcolor property sent from a class to Form
I have a question in C# regarding Datagridview. In this scenario I have a Form where I run a Datagrid bringing information from another class. After the data is loaded by Datagrid.Datasource the…
-
0
votes1
answer3217
viewsAssemblies not found for Visual Studio
Hi, I’m working with Visual Studio It’s the first time I’ve come across this message while trying to debug the program: "C: Program Files (x86) Microsoft Visual Studio 2017 Community Msbuild 15.0…
-
0
votes2
answers589
viewsHow to list only the name of existing folders in a given directory
How can I list only the name of a folder that is inside a root folder? Example: Pasta raiz C:/Downloads SubPastas: Teste/ Teste 2 In my DLL I can list the folders but with its full path, I would…
-
0
votes2
answers1350
viewsIs there any way to receive email through php or in some other programming language?
Good afternoon to all, I’m not a professional developer, I know that in php there are ways to send email through phpmailer(), I wonder if there is any way to receive an email through public domain…
-
0
votes2
answers703
viewsquote and quotes in a string (leaving " or #39; in the View)
I’m trying to put the following text in a string, but I can’t... when I can’t find the wrong double quotes in the arroba... I’m going crazy. Can someone help me? ,{ "@type": "Listitem", "position":…
-
0
votes1
answer96
viewsHow do I display all the columns of my BD Asp.net mvc
wanted to know how to loop when printing the columns of my grid with the values of the database, but it displayed only 1 result even the database being huge, here the code, thanks for the help…
-
0
votes1
answer43
viewsReplace Line in string
I’m creating a C# application using Replace(), i can replace a specific word by another in the entire file, but I wonder if there is a way to do this replace in just one specific line. I want the…
-
0
votes0
answers67
viewsEF Core - Map dynamic columns to a list
I need help in mapping EF Core entities. I have table products and this table can contain different columns depending on customer customization, they will always be text columns. I have a table and…
c# .net entity-framework entity-framework-coreasked 6 years, 2 months ago Eduardo Abreu dos Santos 152 -
0
votes1
answer250
viewsAlert on condition in Controller Asp Net MVC
Good evening, I tried looking in other posts and did not find the answer. I have a Controller in my Asp Net MVC project that has this condition: if (resultado == null) { ModelState.AddModelError("",…
-
0
votes0
answers58
viewsZxing Colorful . net
I need to create a color qrcode using zxing.net however I can’t and I can’t find 1 tutorial on the internet even searching and trying for days, Does anyone have any idea how to develop 1 color…
-
0
votes0
answers25
viewsWhy does Linqpad say a network directory exists, while . NET does not?
I have a network directory on "\\10.88.0.1\rec". However Directory.Exists returns false while debugging in visual studio. This is strange since the LinqPad returns true. Are there any differences…
-
0
votes0
answers23
viewsHow can I work with files in network directories on . NET?
How do I access files present in network directories on . Net? Accessing local files is simple, I can do Directory.EnumerateFiles("C:\\", "*.*"). But Directory.EnumerateFiles("\\\\10.88.0.1\\rec",…
-
0
votes1
answer205
viewsDelete User Identity
I’m new to the Identity, I’m having difficulty implementing the Delete Already Registered Users method. I’ve done Action, I ran View, but I have no knowledge of what methods Identity use to make…
-
0
votes1
answer204
viewsInclusion of files in Visual Studio projects
Good evening. I wonder if it is possible to include a file in a Visual Studio project by programming at runtime ?…
-
0
votes1
answer88
viewsError running Add-Migration Setup
When executing the command Add-Migration Setup for the creation of the table in SQL Server in PM the message below occurs even if I reference the api project with Shared. The system even processes…
-
0
votes2
answers462
viewsFind out how many are older in Windows Forms app
I’m trying to do a C# exercise using Windows Forms that are older than 18 years. The algorithm should read the age of 10 people. But when I run the program it lets me just type an age. public…
-
0
votes1
answer790
viewsProblem with Maxjsonlength when using ajax
Hello, I am using ajax to build a table in an application, but when the event is triggered, javascript does not build html, giving the following error: "Error during serialization or deserialization…
-
0
votes0
answers42
viewsDoubt in the Sendbird API to create a chat
Good evening, everyone, I’m doing a little project and I’m using the Sendbird API to create a chat, however I’m finding problems when receiving the message that was sent from one user to another,…
-
0
votes3
answers172
viewsModal Bootstrap window does not display styles in components - Asp.net MVC
I have a problem that I haven’t been able to solve in months! I’m using a package of bootstrap and JS styles, in which they refer to my _Layout. On all pages that are rendered and inherited from the…
-
0
votes1
answer142
viewsHow to set the Index of a List to start at 1 instead of 0 when populated
Whenever I populate a list in C#, as in the example below, as I add items, they are arranged starting at position 0 in index. If I add 5 items to my list, I will have the positions 0, 1, 2, 3 and 4.…
-
0
votes1
answer33
viewsKeywords As and Is in C#
Well... I was a little confused about the keywords As and Is in C#... I didn’t understand the difference between them nor what they are for... I believe that it is not so difficult to find a…
-
0
votes0
answers154
viewsClear Fujitsu Fi-7160 buffer scanner in c#
I’m working on a Company project, C# Windows Form and I’m still a beginner on the dot net platform. I would like to know with friends by profession, if there is any way I can clean the buffer of the…
-
0
votes1
answer70
viewsHow to run a method on startup of ALL Controllers?
I have a static class that carries language in relation to cookie stored or the URL. Throughout controller I have to insert once the following method: protected override void…
-
0
votes2
answers38
viewsRender css when transforming view into string
I’m using the method: protected string RenderPartialViewToString(string viewName, object model) { if (string.IsNullOrEmpty(viewName)) viewName =…
-
0
votes1
answer54
viewsNhibernate + . Netframework 3.5
Would anyone know which is the latest version of Nhibernate that works on . NET 3.5? I even searched the site itself, but could not find it. The one I own is 2.1.0.4000.
-
0
votes1
answer40
viewsUse of Syntaxtree
I’m studying C# and came across the SyntaxTree while reading about Roslyn. I also read the documentation of Microsoft itself on the link: Introduction to syntax analysis However I still have two…
-
0
votes1
answer31
viewsConverting Jobject with dynamic objects
I have been having this problem for some time, I need to take the values of the given object and add it in a list but I can’t find a way to map them because they are coming dynamically Array…
-
0
votes1
answer61
viewsConfiguration of server Asp
good afternoon. I’m venturing into an Asp server, only I’m lost in its configuration. Like php dev, I put an index.php in an Asp server hoping it would work, but it didn’t. Looking more on, I…
-
0
votes1
answer405
viewsHow to run and capture a command line output in C#
Guys, here’s the deal. I have an app that works on a command line. This application takes parameters per command line, e.g.: program.exe [parameters] I want to make an interface where I run this…
-
0
votes3
answers127
viewsHow to clear a list without losing all positions?
In my application in C#, I have a list List< float> where I store data arriving through serial port. With the execution of the application in progress this list begins to get huge. I am not…
-
0
votes1
answer202
viewsVisual Studio ending Debug unexpectedly (IIS error)
I come to share a solution that for me at least worked after several attempts. But first I will explain the problem occurred: Once using windows 7 I had a problem starting the debug of a Webapp by…
-
0
votes1
answer296
viewsHow do I use the "Math.Max" method in C# without creating a lot of variables?
I’m trying to solve an exercise that’s like this: Make an algorithm that reads the height and enrollment of ten students. Show the enrollment of the highest student and the lowest student And my…
-
0
votes1
answer215
views(Localdb) Error after Update-Database command -> "Cannot attach the file ...."
I am trying to use Sql Serve Localdb in an application with Entity Framework and Migrations, but when I give the Update-Database command, the following error occurs: Cannot attach the file 'C:…
c# .net entity-framework entity-framework-6 migrationsasked 6 years, 2 months ago Márcio Sebastião 769 -
0
votes0
answers519
viewsI am consuming an API with basic Authentication oauth and returns: Incorrect request (400)
Talk, you guys! Next, I developed an api in spring boot and already tested with Postman and it works normally, its security is a very basic oauth authentication. Now I’m testing in an application in…
-
0
votes1
answer61
viewsExtraction of different data from two object lists
I am working on a WEB API and need to remove some values contained in one list and which are contained in another. To be better illustrated would be the equivalent of removing the data from a list…
-
0
votes1
answer94
viewsMethod that works without I call you directly
I’m messing with the Entity Framework and I was mapping to a Many to Many class. What happens is I used a method I can use inside the DbContext to rename a table, and it works smoothly. But I was…
-
0
votes1
answer552
viewsError: The object reference was not defined as an instance of a C#object
I wanted to make a table in console but all ran the program appears error in the method AlunoLista(), I’ve tried to make changes but I can’t get there. static void Main(string[] args) { var client =…
-
0
votes0
answers53
viewsIs using a web api like dll possible?
After the Publish of a Web API project I added in the dll references of this API in another Solution, the intention is to "consume" this API without httpclient, to access the controller methods of…
-
0
votes0
answers261
viewsrzc generate exited with code -2147450749
I am starting a new application and when I have buildar of this error... someone there could give me a help ? i just put a new html code. Version of dotnet: Error presented: rzc generate exited with…
-
0
votes1
answer237
viewsProblem in Saving Many to Many Relationship with Core Entity Framework
I’m having trouble saving a relationship from many to many with Entity Framework Core I have the following entities [Table("quadros")] public class Quadro : BaseEntity { public bool Ativo { get;…
-
0
votes1
answer38
viewsHow do I assign a function to Contextmenustrip in c#?
How do I assign a function to a Contextmenustrip that is on a Notifyicon? I have the following code: private void Thread_Notify_MouseClick(object sender, MouseEventArgs e) {…
-
0
votes0
answers89
viewsHow to start a service?
The function below starts through a file . jar a Webservice. private static void StartService() { try { var FileStart = new…
-
0
votes1
answer24
views -
0
votes1
answer991
viewsHow to join two vectors in another that does not have repeated values?
I need to make a program that reads the values of two vectors R and S, and store its values in a third vector called V. The detail is that it cannot contain any repeated element in the vector V. I…
-
0
votes1
answer53
viewsHow to create a list of objects?
Good afternoon, I’m developing a project. NET Core Razor Pages and in it I will need to create and add items in a list... these items are strings and are extracted from an XML. I’ll leave a part of…
-
0
votes1
answer77
viewsBlock TFS File View
Hello, I have the following problem. I’m working with a team through TFS and shared the project so they can pull (Map & Get). But it has a specific file that I don’t want other developers to…
-
0
votes2
answers355
viewsExtract child tags from an XML
I am consuming a served recipe and it returns me an XML as for example: <retDistDFeInt xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"…
-
0
votes2
answers207
viewsUse different screen resolution according to the monitor
I am developing an application in 1920x1080, but the Pcs that will run are 1280x720 and 1366 x 768. When I run in mine it looks exactly as I want, but when I run in these resolutions, a lot is…
-
0
votes2
answers226
viewsHow to Insert a parameter from my system into an external URL
So, we have a website that when passing a user’s code, it shows the location of the same. Example of the URL:…
-
0
votes1
answer303
viewsHow to do a search with Join using Entity framework Lambda and Linq
How do I search two or more tables. In the system I am doing, I have the tables Barco, Tipodeoperacaodobarco and Classebarco My mapping is as follows: HasRequired(c => c.ClasseBarco) .WithMany(c…