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
-
0
votes2
answers528
viewsError trying to erase image file?
I’m trying to get an image update on a criminal record. When I do this update I want to change the existing image to the new update image. That’s why I’m using the File.Exists and the File.Delete…
-
0
votes2
answers994
viewsA single form with multiple panels or MDI Forms. Which option is more efficient for program performance?
I’m a beginner in C#. I’m developing a simple application, which has several windows. Depending on what you need to do in the program, the user needs to open multiple windows to get to the required…
-
0
votes1
answer207
viewsI cannot enter the Datetime fields in the sql database
I can’t enter in the fields dateCreation and dataRefMovimento in the sql database private Contexto contexto; public void Inserir(RegCabecalho regCabecalho) { var strQuery = ""; strQuery += " INSERT…
-
0
votes2
answers5035
viewsHow to access classes in Unity 3D (C#)
I’m making a 3D game in Engine Unity, an FPS to be more specific and taking advantage of this experience to learn programming in C#, the one I’m having in school. But now I’ve come across a problem,…
-
0
votes0
answers141
viewsIs there a tool to test black box in C#?
I know that Java has the Sikuli IDE. C# has a similar tool?
-
0
votes1
answer57
viewsC# com Storeprocedure
Good evening guys I’m making a system for college and I’m trying to do with Procedure more is not recording on the bench I think there’s something wrong but I don’t think what it is I tried to use…
-
0
votes0
answers115
viewsI want to access a method of a webservice made in C#
I am trying to access the Login method of a certain webservice, but instead of returning the . Token I ask in reply, I get a pure HTML from webservice My code js: $.ajax({ crossDomain: "true",…
-
0
votes1
answer337
viewsSave bytes to a file
I am making an application that needs to read the bytes of a fixed file, I am being able to read clearly, however, it bothers me that the file needs to follow my application every time it starts.…
c#asked 7 years, 4 months ago Wesley Nascimento 395 -
0
votes1
answer1504
viewsC# excel format column
I am trying to format an excel column for currency format. excelWorksheet.Range["S1", "S" + linhas].NumberFormat = "R$ #.###,00" But this causes it to format this way "RR$ 3500,00". In the cell is…
-
0
votes1
answer421
viewsExisting user validation in C#
The function verificaLoginExistente warns that the login still exists, but still continues to the next line of code and registration. I want it to notify and return to register for a new name. My…
-
0
votes1
answer32
viewscall a locally designated variable
I need to call a variable that is empty, but how to do it? I created the following code public ActionResult Index() { cliente cliente; try { cliente = db.cliente.find(id); //etc } catch (Exception…
-
0
votes1
answer42
viewsProblems with Session distinction when two people log with the same user
I have a session problem in a project where I use C# and ASP.NET. If two people log in at the same time with the same user the section variables get the same values. To be sure I took the ID of the…
-
0
votes4
answers520
viewsDiagonal movement Unity 5
I am a beginner in Unity 5, I am trying to create a game 2d, where I want to put diagonal movements after collisions, currently get my object after collision to be thrown up, but I can not in any…
-
0
votes1
answer49
viewsError of datetime
I’m taking a date of two different dateTimes and concatenating into one variable, but when I write the content of this variable is as follows: Period: System.Windows.Forms.Datetimepicker, Value:…
-
0
votes1
answer85
viewsOperation Async how to know when completed?
I have 2 methods Async what to make a Insert in a cloud database.. For internet reasons, there may be transaction failure to treat this problem, I am using Commit and RollBack, to ai blz. However, I…
-
0
votes1
answer37
viewsUipickerview 3 columns
I want to make a uipickerview with three columns, but only the first appears loaded the other empty, I can not find the error if someone knows how to solve thanks. Follow the code below: static…
-
0
votes0
answers420
viewsTrust Level error when publishing MVC application
I need to publish an ASP.NET MVC application on a Locaweb server. But when publishing, the server displays the following message: I tried to tag <securityPolicy> <trustLevel name="Medium"…
-
0
votes1
answer900
viewsTimer in C#
I am programming the screen of a game where will show the player’s score in progressive mode, it shows the score at the end of the match but does not show with the effect of time between numbers. my…
c#asked 7 years, 4 months ago who who who who 653 -
0
votes1
answer49
viewsHow to use Segmented Controls in Xamarin Forms
Galley, A help, I need to use a type of Segmented Controls in my Xamarin Forms. However, it does not exist. I saw that to use Native by platform, but found no example or documentation guide to it.…
-
0
votes2
answers335
viewsHow to specify object in getcomponent?
How do I specify each object in the getcomponent? I made this script, but I can’t specify for each animator. using System.Collections; using System.Collections.Generic; using UnityEngine; public…
-
0
votes1
answer119
viewsHow to remove a selected item in treeview c#
I am developing a new application but I have a final problem to solve and I have tried googlear and nothing I can not find any example. in fact I want to delete the item in treeview that was…
-
0
votes1
answer48
views0.. 1 to 1 modeling in the Entity Framework - Error The Entity or Complex
I’m trying to make a query but returns the error: Additional information: The Entity or Complex type 'WMB.CieloB.Model.Cielotoken' cannot be constructed in a LINQ to Entities query. My consultation:…
-
0
votes1
answer62
viewsIncrement object to HTTP request
I am trying to make a request in which I send a JSON (POST) and receive another, I am doing the following: mount/feed my object and call this request: string URLRequest = URL + customer_id +…
-
0
votes1
answer798
viewsConsole Application C# in Visual Studio
I downloaded the VS 2017 and I’m having problems, I can’t work with the Application Console. I start the program and do the following: Filing cabinet New Project Application in C# There are several…
c#asked 7 years, 4 months ago who who who who 653 -
0
votes2
answers114
viewsHow to receive information in a View?
I programmed my controller as follows: [HttpPost] public ActionResult Login(string pUsuario, string pSenha) { usuario oUsuario = modelOff.usuarios.Where(p => p.usuario1 == pUsuario &&…
-
0
votes1
answer335
viewsLoad excel data on screen
I’m having a problem loading data from a spreadsheet on the screen (table). The system is done in C# MVC5 with Razor and Entity framework, I need the user to choose an excel file already filled and…
-
0
votes0
answers30
viewsHow to access the Raycast gameobject from the Gear VR controller?
I want to know how I can activate the red laser of Gear VR and how I can know information of what the laser is playing ?
-
0
votes1
answer117
viewsHow do I compile this project in C#?
I’m having trouble compiling with the CSC command on prompt And there’s a "namespace" error I can’t fix. I don’t know if I’m doing it right. Project link.…
-
0
votes1
answer385
viewsUpdate , Insert into Entity Framework Using View?
I have a mistake in my project when trying to give a Update or a Insert via the Entity Framework, where view database. I read in English stackoverflow that I can’t perform update or Insert via view…
-
0
votes0
answers543
viewsHow to transport information from datagridview to a textbox in another form?
I have the following question on my application. I have Form1 and in this Form1 I have two textbox, txt_cod.text and txt_fornec.text and a search button, when I click on the search button of this…
-
0
votes0
answers195
viewsProblem with consumption of webservice registered through the Service Ference
I’m having trouble consuming a WS registered by VS, the error that returns is with respect to the deserialization of the answer. Code: using (ErpServiceSOAPPortClient service = new…
-
0
votes1
answer527
viewsHow to remove Windows BIP sound in c#?
I hope you guys are okay. I developed a C# application in Visual Studio, but when pressing the 'TAB' key to change textBox1 to textBox2, it makes the sound of Windows (which is actually the ENTER…
-
0
votes2
answers554
viewsHow to make the main form invisible c#
How do I make the main form created by Visual Studio invisible after opening another one? I tried to use the "Hide();" command, but I was unsuccessful. code : using System; using…
-
0
votes1
answer431
viewsDisplay alerts in an Application Console c#
I warn you that maybe my doubt is too primary, but come on... I’m doing a c#console project, but I’m having trouble displaying error alerts. What I wanted to do was leave a separate part of the…
-
0
votes1
answer99
viewsCan you store hash code in a database?
I was reading some questions here and a doubt has arisen in one of these questions. If I have an application that I need to store strings in a database to compare later with something, but I don’t…
-
0
votes2
answers176
viewsHow to create a View to insert multiple entities
I have an entity that has daughter entities, such as: - Supplier (has main supplier data) - Suppliers - Supplier of telephones - Suppliers - etc.... Where each entity is a database table related to…
-
0
votes1
answer50
viewsObjects Entity Framework
I’m having a question with Entity Framework I have a situation where I want to implement a database structure of an accounting plan, for example: the active current account ID 1.1 is the parent of…
-
0
votes1
answer40
viewsHow to list static properties (Shared Property) equal to System.Drawing.Color
I have a structure called Servicos and in it I have some static properties. Public Structure Servico Public Shared ReadOnly Property Instalacao As Servico Get Return New…
-
0
votes1
answer1462
viewsHow to run a URL by passing C#parameters
Hello, I’m doing for study purposes, a way to search for and bring vehicle information from the FIPE table straight from the api(http://fipeapi.appspot.com/). What I’m unable to do at first is run…
-
0
votes1
answer105
viewsCombobox loading wrong array information
I made an application in C#(Winforms) to load the marks according to the type of vehicle that is selected (car, bike or walking)in a combobox. I put in a button the following code: private void…
-
0
votes1
answer250
viewsHow to test my Xamarin app in Visual Studio emulator?
I made an android mobile application using Xamarin and tested it normally, made some modifications and when I went to compile again, the emulator of the visual studio remained with the old version,…
-
0
votes1
answer1913
viewsHow to Request JSON Data
I need to collect some data from a program that has API: Pipedrive API Reference If I understand correctly, for each task, a URL will be generated to do the Requeste from the data, example:…
-
0
votes1
answer941
viewsC# List<> - Insert into database
I have an app that takes information from a TextBox, inserts into a list List<> and then shows in a CheckBoxList. Example: List<string> quantidade = new List<string>(); for (int i…
-
0
votes1
answer43
viewsScriptmanager.Registerstartupscript and Key
Good afternoon, I wanted to understand how this Key works, I have a function in aspx I need in code-Behind, but when I call with a static Key, putting csname = "x"; She only gets called once, but I…
-
0
votes1
answer694
viewsEnding Two Threads with Progressbar in C#
I’m making a ProgressBar file conversions, each converted file is updated to ProgressBar with a percentage of total files to be converted. I read in a tutorial how to do the ProgressBar, work with…
-
0
votes0
answers38
viewsLarge Inside Loop of Other
The challenge is to find x different ways to divide the object, for 3 people where each has to receive a value less than or equal to M, and the sum of the value that each won has to be equal to N,…
-
0
votes1
answer39
viewsHow to get the right DPI?
I’m trying to get the DPI from the monitor, but it always returns 96, I researched and discovered many people with the same problem. float dx, dy; Graphics g = this.CreateGraphics(); try { dx =…
c#asked 7 years, 3 months ago matheus Lopes 48 -
0
votes1
answer33
viewsHow to unlock accordions even when some exceptietion
I have a screen that releases the accordions once the client’s code is validated with the personal information, etc. But if any exception he locks up accordions, how could you do to leave released…
-
0
votes0
answers39
viewsVisual Studio 2017 v15.3.0 - Bug debugging mode
Follow picture: Follow the image code above: List<string> teste = new List<string>(new string[] { "0", "1", "2", "3", "4" }); I installed the newest version today (15.3.0). Someone who…
-
0
votes1
answer171
viewsIdentify the largest number
I’m making a resource monitoring software and I’m having trouble getting it to identify the largest number. public string max() { System.Diagnostics.Process[] ieProcs =…