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
votes2
answers1274
viewsCompare properties of an object with properties of a list
I have a method: public void MetodoAleatorio(List<RequisicaoFisicaDTO> lstRequisicaoFisicaDtos) { RequisicaoFisicaDTO requisicao = lstRequisicaoFisicaDtos.FirstOrDefault(); } Where I get a…
-
1
votes1
answer229
views -
1
votes1
answer356
viewsGeneric class for CRUD
I have some common CRUD features in the database, such as cadastrar, buscar um registro, buscar todos os registros and excluir. For this, I am currently implementing a manager class each database…
-
1
votes0
answers101
viewsProtect Webservice NUSOAP
I developed a WSDL service through the NUSOAP library. The intention is to make the Web Service can be accessed both by PHP applications and on the platform .NET, however, I would like to add a…
-
1
votes2
answers397
viewsHow to convert a Dataset to Int32?
I’m having an information conversion problem that’s coming from my database to a variable of type Int32. When I do the select max(cur_id) from tbl_curriculo; I send the id information directly to a…
-
1
votes2
answers1886
viewsAssembly Microsoft.Owin not found
In my project I am using the OWIN library for user authentication. I already installed the package, but when I run the project I return the error: Could not load file or Assembly 'Microsoft.Owin,…
-
1
votes1
answer216
viewsHow to load Combobox in C#?
I have 2 Combobox: the 1st represents the provinces, the 2nd municipalities. When you click on Combobox 1 and select a province I want your municipalities to appear in Combobox 2.
-
1
votes2
answers355
viewsMaintenance page ASP.NET MVC
I have an ASP.NET MVC site that when it goes into maintenance I need to display a maintenance page, ASP.NET MVC has some possibility to do this just by changing a key on Web.Config or something…
-
1
votes1
answer338
viewsFormat subitem listview
I have problems defining Subitem background color from listview when returning database query. I need that in the column n° 18, which will return values such as " Expired" and " In Day" when the…
-
1
votes1
answer209
viewsPassing as parameter a generic type in an attribute in . NET MVC
In another question I asked here I had to modify my authentication class to return the values of the model referring to the user and the authenticated user type, for example, admins, users, clients,…
-
1
votes1
answer118
viewsHow to create a method that takes only one string and returns a generic type? . NET MVC
How could I create a method that doesn’t need to receive a type as a parameter, just a string, but would return a type? For example: public static T Guard(string guard_name) where T : class, IAuth {…
-
1
votes1
answer1167
viewsHow to disable editing and block adding Gridview lines
I have a GridView that the user enters with some information and saves, I would like that after clicking save. put all grid in mode ReadOnly and also would like to block to insert or delete lines.…
-
1
votes2
answers72
viewsSorting Code does not return correct value
I have a class assignment whose need is to use an sorting algorithm to sort a list of random numbers. My problem is that I am throwing the items from the random number list into an array,…
-
1
votes2
answers1164
viewsHow to make the selected line font bold in Datagridview?
In Datagridview of Windows Forms it is possible to change the font color and background color of the selected line easily using the properties DataGridView.DefaultCellStyle.SelectionBackColor…
-
1
votes2
answers1002
viewsReturn Enum C#
I have the following: public enum TNFeInfNFeDetImpostoICMSICMS00CST { /// <remarks/> [System.Xml.Serialization.XmlEnumAttribute("00")] item00 = 00, } How do I "take" the "00" value of the Enum…
-
1
votes2
answers358
viewsPing on server with C#
Is there a . Net class with the ping feature? I have the server IP in a string type attribute and would like to drip the server to see if it is online or offline. Does anyone know ?
-
1
votes2
answers4207
viewsCapture file name
I have a form that I search the path of a file in .mdb (Access database), however I wanted to know how I can limit and pick up exactly the string of the file between the last bar of the…
-
1
votes1
answer218
viewsPrecision scaling using Entity Framework and SQL Server
There’s some time I’ve been noticing, something strange when saving values double in the SQL Server database with the Entity Framework. I noticed that when reporting a value ex: 12.23 after…
-
1
votes1
answer165
viewsDifferences between Xmlreader, Streamreader and Stringreader in desiccation
I asked the following question here at stackoverflow question link. During deserialization depending on the stream used, an error may occur in the XML namespaces, depending on the question link.…
-
1
votes1
answer441
viewsUnderstanding structures in the Assemblyinfo.Cs file
Taking a look at the file AssemblyInfo.cs of a C# project I came across some structures of which I am not recognizing. These are the lines: [assembly: AssemblyTitle("")] [assembly:…
-
1
votes2
answers544
viewsChange Color of an Error Message using Annotation
Where can I change the color of that ErrorMessage?…
-
1
votes1
answer1369
viewsHow to browse a Dataset based on the data contained in a Datagridview?
I need to fill out a datagridview which already contains the list of all items. This is based on the records of material movements in a DataSet. The datagridview already has all items, for example:…
-
1
votes2
answers323
viewsSyntax error in SELECT WHERE using ADO.Net parameters
Someone understands this mistake and gets a solution? Code: OleDbConnection ConSelect = new OleDbConnection(); ConSelect.ConnectionString = Properties.Settings.Default.dbInvoice; ConSelect.Open();…
-
1
votes1
answer466
viewsHow do you recover data typed in Gridview and then save to the database?
In a certain register screen, I have a GridView with a few blank lines, then the user would have to type the information in those lines, and then when clicking the save button, do the INSERT at the…
-
1
votes1
answer1476
viewsWhat is and what the Fabric service is for
In my view Microsoft has done an excellent job to support several platforms lately. It all started when they released the platform code. Net. It seems that once again they are investing in various…
-
1
votes1
answer107
viewsEntity Framework does not convert Firebird INTEGER to C#long
I am doing some tests with Entity Framework mapping and migrating a database of a legacy system. Setting Where I have a table similar to that: TESTE -------------------------------------- ID INTEGER…
-
1
votes1
answer302
viewsGet cursor coordinates in C#
I’m using the Control.MousePosition to get the mouse coordinates in windows 10. Then use the following function to get a Printscreen: public static Bitmap PrintScreen(Point Source,Point Destination)…
-
1
votes0
answers45
viewsGenerating two Checkbox tags being a Hidden in Aspnet MVC
Goodnight @Html.CheckBox("Agree", new { value = false, @class = "filled-in", @id = "filled-in-box" }) When I Checkbox in Aspnet, by the above command, it is generating me two Tags being that one is…
-
1
votes0
answers34
viewsAppharbor + Quartz
I have an application in Appharbor (in c#), with only 2 buttons, one to start a job and another to stop the same. I programmed the job to be run every 15 minutes, and repeat forever (or until I…
-
1
votes1
answer884
views"The best compatible overloaded method has some invalid arguments"
I’m creating a service with a method that has an argument like List<OrdemPais>(), and passing an object of this type to the method, but when compiling it appears the error: O melhor método…
-
1
votes0
answers80
viewsCalling Codebehind javascript function while running a process
The idea is I have a grid where in each row there is a button. The desired is that when the user presses the button the page is fixed (Freeze) and have the request validated. And when the server…
-
1
votes1
answer46
viewsCreating EF Designer from a database
By clicking NEXT it closes, when I use a bank sqlserver it works normally, but in this case I’m trying to mysql and I’m having this problem, I’ve made several modifications to plugins, reference and…
-
1
votes2
answers144
viewsRedudancia interface with Disposable
I saw an example of implementing a interface with Disposable which I think is redundant and I would like to know whether I am right. Following example to illustrate: public interface…
-
1
votes2
answers113
viewsDenied file deletion on C#
I am using the following line to create and record: File.WriteAllText(caminho + cliente, xml); In it I write an XML and then I deal with it as follows: if (File.Exists(caminho + cliente)) {…
-
1
votes0
answers37
viewsWhat is the difference between Jagged arrays and multidimensional arrays, and what application is indicated for each one?
I would like to better understand the difference between Jagged arrays and multidimensional arrays, and how each type should be applied in practice.
-
1
votes0
answers36
viewsApi Facebook live streaming
Has anyone ever needed to pick up a List of countries to send a POST with Geoblock using the Facebook API to connect a live? I’m linking my leads for a service, now I need to determine for it the…
-
1
votes3
answers527
viewsDo I need to use "Convert.Toint32()" for text?
I think it’s something with the Convert.ToInt32(), because I didn’t understand its function inside the language. Observation 1: The place where I learn is American and I don’t know much English.…
-
1
votes0
answers370
viewsDynamic input reading in C#
I am developing a solution in Winforms C# that receives a text file via network, via HttpWebRequest: HttpWebRequest request = (HttpWebRequest)WebRequest.Create(conexao + "/piece.txt");…
-
1
votes3
answers223
viewsimplement Ixmlserializable interface in a class
I have a class and need to implement data serialization and deserialization in an XML structure using IXmlSerializable, for this in my class I have to implement the methods, GetSchema(),…
-
1
votes2
answers150
viewsWhat is the difference between public async System.Threading.Tasks.Task<Actionresult> Index() and public Actionresult Index()?
Follows the code: Example 1 : public async System.Threading.Tasks.Task<ActionResult> Index() { return View(); } Example 2: public ActionResult Index() { return View(); } Please explain the…
-
1
votes1
answer82
viewsCapture error when click button
I want to make a button that when it is clicked is shown the information of SQL Server and say that it is connected (have to configure the file in XML Configuration File) See below the code: public…
-
1
votes1
answer4261
viewsCurrent time of the states of Brazil C#
I’m trying to get the current time of the states/DF Brazil with different time. I found the code below but it didn’t help much. Does anyone know any way to do it without webservice? public static…
-
1
votes1
answer100
viewsNested for conversion to threads
I got the following for nested throughout the length of an image bitmap in C#. I would like to rotate the second one with threads to be executed in parallel. Bitmap alterado = new…
-
1
votes0
answers38
viewsParallel vs Tasks vs Threads
I was doing a Consoleapp and I was left with a doubt, what is the big difference of each of these and what are the advantages and disadvantages? In which case I would use Parallel, in which case I…
-
1
votes1
answer301
viewsHow to work with anonymous guy
I have the following code snippet: var filter = new { categoria = 1, cond2 = foo, ... }; p = new ProdutoBusiness().listarProdutos( filter ).ToList(); I wanted to work with this anonymous type as a…
-
1
votes4
answers110
viewsWhy this division in the class instantiation in C#?
In the book "Use the Head - C#", the author declares classes in a way that I did not understand their usefulness, according to the example: public partial class Form1 : Form { Farmer farmer; public…
-
1
votes5
answers1664
viewsI want to put the number of characters and put whether it even or odd
But my code is going wrong. namespace Impar_ou_parr { class Program { static void Main(string[] args) { string NumLetras; Console.WriteLine("Digite uma Palavra: "); NumLetras = Console.ReadLine();…
-
1
votes0
answers568
viewsUI and desktop development . NET
I am at the beginning of the development of a commercial application in C#, however, I have my doubts about how I will do the visual part of the application (UI). I’ve worked with Windows Forms and…
-
1
votes2
answers1660
viewsSelect Where in LINQ
How to convert code select below in LINQ? select * from producao where id not in (select idProducao from bpi)
-
1
votes1
answer112
viewsIsGenericType, GetGenericTypeDefinition e Nullable.GetUnderlyingType
In a code snippet I was suggested the use of these three members in order to verify if the properties of an object are Nullable. p.PropertyType.IsGenericType &&…