Most voted "c#" questions
This tag should be used when the question refers to some resource, information or problem related to the C#language. C# ("C Sharp") is a multi-paradigm programming language that has strongly typed variables, is imperative, declarative, functional, generic, object-oriented and component-oriented, which are designed to be executed in . NET Framework.
Learn more…13,899 questions
Sort by count of
-
1
votes0
answers30
viewsLicensemanager.Usagemode C#
I have a form basis that all others inherit. I picked it from a question here from the same site. That’s the construtor: public BaseForm() { if (LicenseManager.UsageMode ==…
-
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
votes2
answers1272
viewsConvert int to Hex
what I want to do is possible? convert the value variable to Hex. private void button1_Click(object sender, EventArgs e) { int value = 255; byte[] buffer = new byte[5]; buffer[0] = 0xff; buffer[1] =…
-
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
answers69
viewsInclude associated class objects (Applicationuser and Userprofile) - Applicationusermanager and OWIN
I have the following problem: Within the method GrantResourceOwnerCredentials in class OAuthProvider : OAuthAuthorizationServerProvider i am filling in custom properties to be returned with the…
-
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
answer231
viewsRepeated tags, file . windows bat do not delete some tags
I’m having a problem with a company system here which is next. The system generates labels and prints them on an Argox printer, these label printers. Are tags of requests that are generated with PHP…
-
1
votes3
answers237
viewsDoubt with pagination in Asp.net
Does anyone know how to implement a pagination or would have an example using this architecture https://github.com/cleytonferrari/PadraoDeRepositorio/tree/master/TISelvagem I would like to use the…
-
1
votes2
answers274
viewsRestrictions of AD Groups
I’m currently developing a Webapp where I have already managed to get login to confirm the user credentials in the AD. Basically the login already works correctly. My goal now is to create 1 group…
-
1
votes2
answers143
viewsHow to disable Forms Authenitcation for the Web API?
I have an Asp.Net MVC project and inside it has the Web Api, when a request sends an invalid token, Forms Authentication redirects to the login page, but I need it to only return an Http 401 error,…
c# asp.net-mvc asp.net-web-api web.config forms-authenticationasked 7 years, 8 months ago Fábio Lima 81 -
1
votes1
answer51
viewsC# - Cursors.Hand.Handle does not identify cursor " Hand "
I made a program to identify if the mouse cursor is Hand or not. I’m using an event that identifies the global cursor, so even outside the Form he is able to identify. The problem is that in the…
-
1
votes1
answer3878
viewsc# how to use the POST method with Restsharp
I have a code to log in, but when I send the correct data the API continues to send the code "Unauthorized". The code is as follows:: var client = new RestClient("link"); var request = new…
-
1
votes2
answers560
viewsWindows form integration with html page
I have an application that is a Windows Forms that I need to integrate into an HTML page of my web application In case it causes Windows Form to stay there fixed as if the two were one thing. This…
-
1
votes2
answers183
viewsCan I use C# (through Visual Studio) to develop a program for Mac/OSX?
I wonder if Visual Studio (through a computer running Windows and the C#language) can create an administrative program (simple, for 1 user, involving only one database interaction) for a computer…
-
1
votes1
answer41
viewsDetect when there is rotation of Windows tablet screen
How do I identify when there was a rotation of the Windows tablet screen?
-
1
votes2
answers89
viewsLanguage for processing business rules
I am architecting a new project in C# and one of the needs is that module does mathematical calculations on values that I will have in the database. This module needs to share these rules with…
-
1
votes1
answer36
viewsString.Content How to Not Case Sensitive
Well I have a string where I want to search for a word but not case sensitive Example: string tt2 = "teste amanha de manha"; string pp = "Amanha"; if (tt2.Contains(pp)) { //Não entra na condição…
-
1
votes1
answer693
viewsUnderstanding the DDD Concept
Good, I’m starting a new application, relatively simple, and I want to structure it into the DDD concept. I have read a lot on the Internet, I have seen many examples and meanings, but I would like…
-
1
votes0
answers17
viewsDoubt with Decompiling VB.NET project
A class compiled in J# or Vb.net after is in a DLL, there is some program that can decompile by passing a code that is in Vb.net to C# or J# to c#?
-
1
votes1
answer1633
viewsAdd Datatable C# columns with Linq
I have a DataTable containing a column called SubTotal. I would like to add up the total value of this column. I tested some examples: object sumObject; sumObject = table.Compute("Sum(Amount)", "");…
-
1
votes1
answer319
viewsPost null no Edit MVC
Hey, I got this situation, man Edit returns a group of Classes filled for editing. In my View the data is filled correctly, however, when I edit a field and have it saved in the Edit (Post) my Model…
-
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
votes0
answers256
viewsHow to use Postgresql with Entity Framework?
I have a system that I am developing in C# WPF using Postgresql as DBMS and wanted to use this same database for my application in ASP.NET MVC. You can make the Entity Framework have access to the…
-
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 &&…
-
1
votes0
answers73
viewsApplication in c# that collects data from a computer network
Good evening, I am developing an application in c# that collects data from several computers with logically different Ips, this access is being done at the same time and the information is handled…
-
1
votes5
answers1114
viewsSave Combobox C# values to database instead of descriptions
I have a screen in a simple registration form, where it has some combobox. I set its values manually same. EX; In a combo that will register the access profile of a user, I have in this combo the…
-
1
votes1
answer152
viewsNullreferenceexception: Object Reference not set to an instance of an Object Motioncontroller.Fixedupdate
I am following this Unity tutorial: http://unity3d.com/pt/learn/tutorials/modules/beginner/2d/2d-controllers This was going great all the way to the part where you test to see if I’m touching the…
-
1
votes1
answer1190
viewsHow do I sync an offline database to an online one?
I have two identical databases, one offline and one online. In every field of a table I have a column called online with values 0 (did not send the data) or 1 (already sent the data). Usually I…
-
1
votes2
answers2273
viewsHow to make Sprite sheet exchange at Unity without having to do more animations?
Hello, I’m playing a game where it will be possible to switch characters in Unity. The game will be in 2d, for android and I’m facing problems to make the exchange of characters. I made a functional…
-
1
votes0
answers715
viewsHow to sign PDF with A3 digital certificate in C#?
I need to sign a PDF file with A3 digital certificate. It can be in C# or VB.NET.
-
1
votes1
answer58
viewsQuery and view in dropdownlist
Is giving the error below in dropdowList and do not understand why. Error: Cannot associate the 'System.Collections.Generic.List1[<>f__AnonymousType82[System.Int32,System. Stri ng]]' to type…
-
1
votes2
answers70
viewsHow to fetch a json value from the goo.Gl API to C#
I’m trying to use the goo.Gl API to shorten some links. The problem is I don’t know how to get the generated return json URL. See below how it is organized: { "kind": "urlshortener#url", "id": "AQUI…
-
1
votes1
answer56
viewsUpdating a datagrid with mysql connection
I can’t update a table from a database linked to a datagrid. When I change the data in the datagrid cells, although these appear changed during the debug, at the end the table is not updated. Does…
-
1
votes1
answer127
viewsCode displaying decimal value in C# for Java/Android
I have a code that rounds up a value like decimal for homes I want, and would like to implement it on Android in Java however I’m having some difficulties, follows below the code in C#. public…
-
1
votes0
answers39
viewsWhen is it necessary to use GC.Collect()?
I know that in . NET/CLR, the Garbage Collector acts alone, without it being necessary to call him manually. There are cases where the Garbage Collector does not "collect" automatically? When it is…
-
1
votes1
answer224
viewsParameters in the Query
When mounting a Query using Addwithvalue. Even if right, the return is not as expected. In the example below the return is Zero var query = "SELECT nome,usuario,email,administrador FROM GSCUsuarios…
-
1
votes1
answer529
viewsError 500 when trying to give a post from a JSON to the web service C#
I have a WINDOWS FORM C#application, where I communicate with a web service, when I try to send a very big data from my application to the web service I get error 500. I can do a POST on any other…
-
1
votes1
answer1495
viewsWhen opening Solution, folders with projects do not appear
I created a Solution, based on the video of Eduardo Pires. I saved and went to do something else. Well, when you reopen Solution, the folders with the projects do not appear, leaving only the…
-
1
votes2
answers275
viewsHow to know which button called the page?
I have a page with 3 buttons that call the same page and wanted to know if it has how to see which of the 3 buttons called the page. Are buttons Web Forms. What I did was put them to add a value to…
-
1
votes1
answer60
viewsError compiling Class Library + Microsoft.DNX.Packagemanager
I created a Class Library project in Visual Studio 2013 Express using framework 4.5, but when giving a Build in Class Library the following error occurs : ------ Build Started: Project:…
-
1
votes2
answers193
viewsDropdownlistfor has no selected value
Dropdownlistfor shows no selected value. public static List<SelectListItem> getMesesPagamento() { List<SelectListItem> listMeses = new List<SelectListItem>(); for (byte i = 1; i…
-
1
votes1
answer49
viewsHow to create a Mesagebox by listing data in c#?
I intend to create a notification, using messagebox, to list all products registered in the system with minimum amount once I run the system.
c#asked 7 years, 7 months ago António Mateta 159 -
1
votes2
answers407
viewsHow popular is the list of objects with select(C# and Mysql) results?
string strSQL = "SELECT usuperm.idusuario, usuperm.codfunc, usuperm.perm FROM usuperm INNER JOIN usuarios ON usuarios.idusuario = usuperm.idusuario WHERE usuarios.loginusuario = @loginusuario AND…
-
1
votes1
answer828
viewsHow to change the app.config file at runtime?
how can I change the app.config file at runtime? I want to change the connection string: <add name="WiconEstoqueDataContextConnectionString" connectionString="User…
c#asked 7 years, 7 months ago Italo Rodrigo 4,344 -
1
votes1
answer47
viewsHow does C# run in the universal app?
I started studying the universal Windows 10 app and saw that the execution mode is different from Win32 or . Net, since it uses Winrt that calls directly to the system kernel, leaving languages like…
-
1
votes1
answer50
viewsUniversal app win 10 alert
I need help to send out an alert signal on the app I’m trying to develop. Initially I thought of showing a textblock flashing in red on the screen. if anyone has another option better help me or…
-
1
votes1
answer32
viewsProblems with Ribboncombobox
Good afternoon, we are developing a text editing tool. In it we are using the menus with the "Ribboncontrolslibrary", and until the moment everything is right. When I decided to use Ribboncombobox I…
-
1
votes1
answer233
viewsQuantity limit in database query
public IList<DtoContrato> ConsulteListaPorListaDeIds(List<Guid> listaIds) { return Conversor(Persistencia().Where(x => listaIds.Contains(x.Id))); } My question is, if the list of ids…