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
votes4
answers3646
viewsCapture selected value in grid checkbox
Hello, I have the form above where it shows all the products I have registered in my database and presents in a Gride. I put inside this Gride the option to select (checkbox). I would like you to…
-
1
votes1
answer128
viewsProject only runs if Visual Studio is installed on the client machine
Hello. I have a project done in WPF, which uses data returned by web services to interact with the user. This system, when starting, consults the IIS to see if it is standing, if the web services…
-
1
votes2
answers182
viewsLocal database (serveless) not modifiable with update
Setting: I’m developing a small app WinForm in C# to distribute to sellers to assemble their quotes more quickly and would like to store simple information such as budget issued and registered…
-
1
votes1
answer146
viewsHow to pass more than one argument using Process + Openssl
Using the following code I pass a certain argument, then I need to pass a password that Openssl requests, but how do I do that? I tried the StandardInput but I received an exception: Additional…
-
1
votes2
answers106
viewsError changing static property value
I have my class DadosConexao, this class is responsible for storing the connection string of the database, it contains the following properties: A statistical property StringConexao. isServ…
-
1
votes2
answers134
views'system.outofmemoryexception' while opening . dbf 300 mega file
I try to open a file . dbf from 300mg in my code, but this error appears '$Exception. Message' threw an Exception of type 'System.Outofmemoryexception', a smaller file of 300kb is open normally, I…
-
1
votes0
answers78
viewsBlock coding
I’m trying to develop an application of Block coding. I found it difficult to develop this type of application. With the events below, I can identify when there is a collision between other controls…
-
1
votes1
answer183
viewsSort nodes from Tree view
In my Tree view I have several child nodes. All nodes are created with numbers as these identify a different file and are composed by date. How could I sort these nodes numerically? I mean, like:…
-
1
votes1
answer144
viewsAssert.Areequal() fails when everything seems to be right
I can’t find any errors in my Bubble Sort algorithm. But the assert returns error. I’m passing wrong arguments to the Assert.AreEqual()? //The method for testing public static int[] BubbleSort(int[]…
-
1
votes1
answer77
viewsDownload file via ashx
I need to make a Javascript method that calls an ashx (Generic Handler) that returns an array of bytes (a file). This file can be XML, TXT or PDF. So far I solved the problem, but when the file does…
-
1
votes1
answer384
viewsHow to delete information in BD using Datagridview?
Can anyone tell me which command should I put to delete from the database using the information of the selected phone? I put it like this: SQLcmd.CommandText = ("DELETE FROM usuario WHERE nome = '"…
-
1
votes1
answer4652
viewsChange color of a given cell
I have a DataGridView which has 8 columns (days of the week) and x rows (hours of the day). I need to paint just one cell, getting like this: how could I do that? I already have the following…
-
1
votes1
answer1909
viewsHow to convert decimal to binary with large numbers?
I am creating a program in C# language to perform conversions I am currently implementing the binary -> decimal and decimal -> binary. How can I do the conversion if user type large numbers as…
-
1
votes0
answers402
viewsPick up records on Datagridview and play on a label
Guys, my idea is this, I want to pick up records on a Datagridview and play on five Abels. Each one corresponds to a command, and these boxes will change to another record once clicked. Example:…
-
1
votes1
answer542
viewsTransfer List from one class to another
I want to handle a list in a method of another class and then return the treated list. I would like to know how to transfer this list to the other class. I did it this way: Main class: DataTable…
-
1
votes1
answer54
viewsReason for different versions of DNX depending on the OS
A while ago I asked here about what . NET Execution Environment (DNX) really is. After reading the answer and the DNX Wiki I started to understand DNX as an interface between the virtual machine in…
-
1
votes2
answers295
viewsUnknown command: 'syncdb' Visual Studio 2013
I’m having trouble developing a system in Django. When I try to synchronize the bank this error appears: Python interactive window. Type $help for a list of commands. Executing manage.py syncdb…
-
1
votes1
answer59
viewsIs it possible to create individual events for the instances of a form in C#?
Suppose I have a customer registration form: var frmCadCli1 = new frmCadastroCliente(); And I just called that form: frmCadCli1.Show(); When I call this form, immediately before it is shown the…
-
1
votes1
answer92
viewsLinq to SQL - Dynamic sort by column index
I’m using a component called datatables.js (https://www.datatables.net/) to display my tables and it owns the property Serverside, that I call, in Ajax, my list from somewhere. It sends the…
-
1
votes2
answers230
viewsHow to implement and use the Binarysearch method?
How to implement and use the method BinarySearch of a List<T>? I’m having difficulty implementing and also how to use it in a practical way. Follow the example for illustration: int…
-
1
votes1
answer395
viewsTo delimit a txt file, that is, the line size should be 700 characters for all subsequent lines
I created a routine that reads some tables and generates lines as read. It’s all right at first. but the generated txt exceeds the size of the fields, for example, a field has size 10 and another…
-
1
votes0
answers67
viewsWindows Service running does not connect to database
Good afternoon guys. I created a 3-layer Solution for a windows services project. In debug I can search the database information and do the processes with the return. However, when I put the process…
-
1
votes2
answers287
viewsCreate product classes and photos and initialize
I have a class Produto and within that class I have a class Categoria and a Class Foto. 1 Product may have only 1 category, but may have multiple Photos. The problem is with the photos. I did so:…
-
1
votes1
answer60
viewsNumber of accesses per page
Hello, can anyone tell me if IIS has any resource that I can see how many hits each page had?
-
1
votes2
answers525
viewsPath null parameter
I’m trying to get into a controller, receive a parameter and print it in the View by a ViewData or ViewBag. My Controller: public ActionResult Index(string information) { ViewData["Bag"] =…
-
1
votes1
answer453
viewsText inside a picturebox
I want to do it in PictureBoxes for when I pass the mouse she show the message I wrote. How can I do? Remembering I use the version Visual Basic 2010…
-
1
votes0
answers85
viewsGet primary key values in Table Adapter
How can I get all primary key values in one Table Adapter. One by one I can get at the time of the Insert with this code: PegaIdOrc = orcTableAdapter.GetDataByMaxIDOrc().…
-
1
votes1
answer817
viewsGenerate Class From XSD - CTE for SEFAZ Webservice
Referring to the generation of NFE and CTE classes from XSD for use in the SEFAZ Webservices. I have had some problems of ambiguity in the name of the generated classes. I used the Visual Studio…
-
1
votes2
answers2117
viewsWhat is a literal?
In that link from the MSDN website says that a literal is: A literal is a value that is expressed as itself rather than as a variable value or the result of an expression, such as the number 3 or…
-
1
votes1
answer206
viewsArgument data type xml is invalid for argument 1 of Len Function
I am mapping a property to the xml database using Migrations. public string Xml { get; set; } this.Property(t => t.Xml).HasColumnName("Xml").HasColumnType("xml"); However, when consulting the…
-
1
votes4
answers1276
viewsHow to get the amount of records from a Datareader?
I am doing a query in a database, but need to know how many records I will get from this query, before I even start crocheting. Note: I don’t want to put a counter inside the mesh, I need the value…
-
1
votes2
answers534
viewsLINQ update of all listed items (changing the status of all listed items)
I have a Linq that presents data listed according to the required filters (date and unit) by the user and another filter to validate a code with another table (which is not the case). I wonder how I…
-
1
votes2
answers634
viewsStart multiple threads in a repeat command
I have a project where I need to start 30 times a thread which will run the same method, and wanted to do this in a repeat command, for example: for (int i = 0; i < 30; i++) { Thread t = new…
-
1
votes1
answer462
viewsHow to use Generic Method with Dapper?
I have 2 methods from a generic repository public TEntity ObterPorId(int id) { return Db.Set<TEntity>().Find(); } public IEnumerable<TEntity> ObterTodos() { return…
-
1
votes2
answers120
viewsInsert text into images
I have a Switch that according to the given status it plays an image, but I would also like to play the numbering of that status in the image (that text that usually when we touch the image it…
-
1
votes1
answer264
viewsHow to select more than one txt file with C#
I’m writing a C# application that needs to receive more than 1 text file and display the Filename of them in a MessageBox individual for each. My question is in this import of the files, I was using…
-
1
votes1
answer116
viewsUse of threads in C# without storing in variable
If I start a thread anonymity: new Thread(chat).Start(); and would again instate it in the same way, it overlap the other thread? If not, how should you give a "Kill" in the first thread in…
-
1
votes1
answer125
viewsError while compiling project
I am receiving the following message to perform the build in the project. Error A namespace cannot directly contain Members such as Fields or methods Files : Model1.Cs Model1.Context.Cs Line 1…
-
1
votes1
answer653
viewsMethod within method or class within class
Created the methods Above(), Below(), Highest(), Lowest(), Evens(), Odds(), Matching(), Repeating(), Unique()... I need to create a structure/implement these methods inside each other, as if they…
-
1
votes2
answers134
viewsDatabase server in Azure
I created a database server in Azure in the US. Before, my database was in Locaweb. In Azure, the queries to the bank became slower. I tried to create a server here in Brazil, It appears the…
-
1
votes1
answer65
viewsCommunication/Authentication . net for PHP
I need to implement an authentication system on a page. The scenario is as follows, I have a page that can only be accessed by authenticated users coming from a site (in ASP). This on the client…
-
1
votes1
answer416
viewsAsync Method with Await in his Return
public async Task<IHttpActionResult> NomeMetodo([FromUri] Filtro filtro) { return await Task.Factory.StartNew(() =>Ok(_aplicacao.RetornarDados(filtro))); } I wonder why the above method…
-
1
votes2
answers250
viewsObject error not instantiated
I have a model calling for ClientesModel. Inside it I have the fields: public int id { get; set; } public int codcli { get; set; } public string nome { get; set; } public string endereco { get; set;…
-
1
votes1
answer1233
viewsAdd days on increasing date via For
In the code below I add 1 to each step in the variable i, to add 30 days in the field dt, I need another for or you can do it yourself? DbConnection cnx = ADO_Utils.GetConnection(); DbCommand cmd =…
-
1
votes0
answers973
viewsA transport-level error has occurred when Receiving Results from the server
I have an app Asp.Net MVC 4 (with Entity Framework and SQL Server) that works normally on my application server, but now I had to work with redundancy and load balance with two new servers for the…
-
1
votes2
answers78
views -
1
votes1
answer204
viewsSeparate items from a string using Regex
I need to separate the items of a string in an array using C# and Regex, could help me? The string is as follows: required|email|min:2|max:255 There are some rules I wanted to suit: Separate main…
-
1
votes1
answer63
viewsChange the culture of Monthcalendar
It is possible to change the object’s date format MonthCalendar from a Winforms application? It occurs that the crop selected at a customer’s station is Polish and this is causing error in handling…
-
1
votes2
answers326
viewsVector receives method return
I am assembling a program in C# and created a method called Supply that receives an array called a number and returns the same. The idea is that the supply function creates random values, fill in…
-
1
votes1
answer40
viewsError trying to set Npgsqldataadapter Missingschemaaction property
I’m trying to set the property MissingSchemaAction of an object NpgsqlDataAdapter, but Visual Studio is complaining that the property does not exist. I looked at the github of the project and saw…