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
votes1
answer80
viewsIncompatibility problems with BLE Plugin with Xamarin project
I installed a plugin in my application Xamarin Forms and I’m having incompatibility problems: BLE Plugin 1.3.0 was Restored using . Netframework v4.6.1 Instead of the project target framework .…
-
1
votes0
answers47
viewsHow to avoid possible incompatibility in Windows
Good morning, everyone, There is some choice to be made when creating an application so that it is compatible with the versions of windows 7, 8 and 10 ? I’m doing today as 32bits, it’s enough ?…
-
1
votes1
answer135
viewsUpload photos with Javascript/Ajax preview
Hello, I’m making an administrative website, in this site will have the option to upload photo, the user could upload up to 3 photos. My idea was to make kind of facebook, where you click and add…
-
1
votes1
answer136
viewsCreate and show a badge on an Xamarin page
I use Xamarin.Forms(Net Standard) and am having difficulty creating a badge and showing its value. I have a page (Tabbed Page) that has a Grid with 8 cells. Each cell has an image and each image…
-
1
votes1
answer355
viewsDoubt : Search with Dropdownlist mvc 4 Razor Asp.net C# sql Server
I’m having difficulty in popular dropdown with sql server, because it comes repeated sql item ... ex: when I select cities it comes with repeated cities and so on, and I can’t direct to search page.…
-
1
votes1
answer323
viewsHow to handle different combobox data at runtime
I have a textfield and a combobox next to it... Follow the image I want to make sure, given the value in the field textfield, I want you to click on other item of the combobox, the value is…
-
1
votes1
answer56
viewsCritical for when to deploy
In the case of a webforms . NET application that is being deployed, there is some way to warn the user that the system is being updated?
-
1
votes0
answers339
viewsEvent Button click, added dynamically, does not work
I’m working on a page that loads a list of items into a GridView. The content is being loaded normally, but the need to add a cell with a text and two buttons. With the code below is adding the…
-
1
votes2
answers180
viewsHow to load a number list into a TXT file for a C#list?
I have the following list of numbers loaded from a table, and is separated by the character "|": 40 |16000|20|311258|3 40 |17000|20|857392|5 50 |18000|90|528777|1 60 |19000|20|917336|3 60…
-
1
votes2
answers675
viewsHow to organize an Array in Date order?
I am wanting to organize an array by Crescent date order. I was thinking of cutting the parts using the bar (/) and compare with the other parts, but I don’t know if it’s the best way to do it. I…
-
1
votes1
answer58
viewsHow to turn a UNIX timestamp into Datetime?
I have a date field in the format UNIX timestamp, and I need to turn this field into a DateTime of C#. How to proceed? Example of input: 1514959643539 Desired output: DateTime with correct date/time…
c#asked 6 years, 9 months ago Tiago César Oliveira 2,855 -
1
votes4
answers2259
viewsHow to display a Javascript message in an Asp.net MVC view?
I have this code: @if (!string.IsNullOrWhiteSpace (Model.ErrorMessage)) { <Script> $ ("#ModalError').modal.('show.'); </Script>…
-
1
votes1
answer124
viewsHow to use a concrete class method created from an interface?
In class Lawyer implemented all Interface properties and methods Ipessoafisica, and some other class-specific properties and methods Lawyer, how to Advocate() and Oab. How to access this method?…
-
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
votes1
answer104
viewsLogging into a website using Webrequest
I need to log into a website using the Asp.net web Forms. I am doing so. How could I redirect to the page after logged in? protected void Button1_Click(object sender, EventArgs e) { var loginAddress…
-
1
votes1
answer557
viewsIs it possible to use Webbrowser on the web Forms Asp.net c#?
I’m looking to use Webbrowser on Asp.net C# My question and log into a website using it using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Web;…
-
1
votes0
answers55
viewsWebbrowser is running on Visual Studio’s Iisexpress, but not working on Windows ISS
Webbrowser is running on Visual Studio’s Iisexpress, but not working on Windows ISS. I run this code after creating the Thread SetApartmentState(ApartmentState.STA) try {…
-
1
votes1
answer722
viewsIs it necessary to pay something to use Asp.net?
I heard that . Net is not free and I have to pay for Microsoft if I publish an application . net Is that true? If I want to install the technology on a web page server I have to pay something ?…
-
1
votes0
answers237
viewsCode to receive file through POST
I’m making a webAPI to receive files via post. Customer will send via classic Vb with the following code: Set content = CreateObject("MSXML2.XMLHTTP.6.0") content.Open "POST", url, False…
-
1
votes1
answer77
viewsProtocol breach problems on FTP Server (Ftpwebrequest)
In the company I work I have two servers: a place that belongs to us and a third party provider. I have to make a copy of the system files that is on the third party provider to our local server.…
-
1
votes3
answers1421
viewsCompare if two date fields are equal in C#
I have a form and in that form I have two date fields, the campodata1 and completed by the user and the campodata2 and filled by the database, now I need a code to compare if these two fields are…
-
1
votes0
answers104
viewsProcedure in Firebird with C#
Good evening I’m new in Firebird, although I’ve handled it a few times, but nothing professional, but now due to a need the embedded solution has been set to use. Well, I am developing a user…
-
1
votes1
answer297
views -
1
votes1
answer381
viewsinclude decimal places Value 1500 and leave it as 1500.00 without comma!
I have an integer value of 1500 in the monetary value variable and want to send to another value variable like 1500.00 . How to do in c#. I have tried conversions and nothing happens... In the end,…
-
1
votes1
answer967
viewsEntity Framework Core Error
I have an error with Entity Framework core when I add Migration, the following error appears to me: System.InvalidOperationException: Cannot use table 'Atleta' for entity type 'Pessoa' since it is…
-
1
votes1
answer28
viewsIs there any way to extend a main file into Webforms?
I am maintaining an old application that uses Web Forms. This application uses Iframe to make a kind of layout reuse. The problem is that even doing this, a lot of code is repeating, and I’d like a…
-
1
votes0
answers22
viewsI have difficulty showing objects as properties of other objects in Datagridview
I have difficulties showing objects as properties of other objects in Datagridview I have the Address class which is a property of the Vendor class In the Transfer Area public class Endereco {…
-
1
votes1
answer79
viewsHow to count how many instances of a program are running from a shared folder?
I am developing an application that runs from a shared folder. In the same folder is the Access database. To avoid conflicts in Access, it will only be allowed to run by only one user at a time, and…
-
1
votes2
answers454
viewsHow to convert Float to String using LINQ for Entity?
How to convert Float to String using LINQ to Entity? I need to convert a field from my database that has the float type to the string type in my C# using the LINQ. Try using Convert.Tostring,…
-
1
votes4
answers4237
viewsValidation for Phone type field
Personal someone would have some validation for telephone field type? Where the user cannot place dummy numbers in the field as number sequences (99999 8888 123456) or something like?…
-
1
votes1
answer141
viewsDetect collision from a rotated rectangle?
I’m using the following code to know if a point is inside a rectangle: public bool Intersect(ÍcaroDantasCollisions.Rectangle rectangle) { if(x >= rectangle.x && x <= rectangle.x +…
-
1
votes1
answer40
viewsWhy doesn’t my Datagrid add anything?
public partial class TelaQuadroAdm : Form { public TelaQuadroAdm() { InitializeComponent(); } private void TelaQuadroAdm_Load(object sender, EventArgs e) …
-
1
votes1
answer70
viewsShare on a web service with the client
I created a web service where there are numerators to keep track of an attribute of the whole type, I would like to know how to access this enumerator of another project in which I am using this web…
-
1
votes1
answer41
viewsHow to mount a message array and send to a Badrequest
I understood in the previous post the badrequest. I need to assemble a message for it as follows. If a commodity does not have a Serial Number, I must assemble a message and send it. Let’s say my…
-
1
votes1
answer114
viewsEntity Framework (ORM) and Dropdownlist Html
Have two models we map that will work like this : The model Afazer will have a Combobox(Dropdownlist) which will make available the categories for the user to select, but these categories are…
-
1
votes2
answers75
viewsSonar: Validate changes from a given date
I use Git integrated with Team Foundation Server. The idea is to place Sonar as a step in TFS to stop the build as per the established rule. I need to know if it is possible for Sonar to apply the…
-
1
votes1
answer126
viewsWhat good is this command?
Hi I’m having a question and I need a C# command that activates and deactivates a layer inside the Imator in Unity 3d. This server command for this? Animator.GetLayerName ("Nadando"); In case I want…
-
1
votes0
answers40
viewsDatabound values of an object for Textbox
How can I databound an object to form fields? The idea is to always fill in the "textBox1" field to update the "Name" value of the objClient automatically. I know by direct assignment it works.…
c#asked 6 years, 8 months ago Daniel Fernandes 235 -
1
votes1
answer193
viewsMap Object value to Entity Core
I have the class public class Email { public string Endereco { get; } public string NomeExibicao{ get; } } I am trying to map in EF Core using the following code builder.Property(e =>…
-
1
votes1
answer154
viewsDoes not send email password recovery by Sendgrid
I implemented a class for sending password recovery email, but the email is not sent. Class code sends email: public static Task EnviaEmail(string email, string assunto, string mensagem) { var…
-
1
votes0
answers60
viewsGenerate International USPS Tag with Easypost C#
I would like to generate a label(label) international of USPS with the easypost, but when I put address of Brazil or other country other than the US, he of error. Example:…
-
1
votes1
answer2887
viewsHow to check the version of . net core and uninstall and reinstall another
I need to install the version of . net core 2.0. I need to know which version is installed and uninstall to install this one. How do I do this?
-
1
votes1
answer190
viewsProblem saving Dropdownlist information to the database
I’m having trouble saving information in the dropdown by btn-save I have a property registration form and the information entered in the dropdown occurs only that at the time I save on another page…
-
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
votes0
answers29
viewsPerformance - Helpers
I have seen several times programmers adhering to the helper in the view, instead of html. I agree that there are cases where you actually "save characters" using them, but, and with respect to…
-
1
votes1
answer43
viewsCombobox Visual Studio Csharp
I’m complementing a system with two combobox In the comboBox1 the name of the folders shall appear for user selection, In the comboBox2 should appear the .exe which will be transferred to a…
-
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
votes1
answer121
viewsConvert UTF-8 string to C#standard format
I’m downloading a string via WebClient() and I get a string with the badly formed accents. Example:…
-
1
votes1
answer260
viewsDatetime object with DIA, MES, HORA
I need to create an object of the type Datetime that contains only Day, Month and Time. You may have minutes and seconds but you can’t have a year. How do I do that?…
c#asked 6 years, 8 months ago Matheus Saraiva 2,157 -
1
votes1
answer886
viewsError restoring nuget packages, UWP project
I have a project Xamarin UWP, and by doing the build of the project, happens a series of mistakes of that kind: Severity Code Description Project File Line Suppression State Error…