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
answer1019
viewsSelenium getattribute list c#
I’m having a problem creating a list with attributes follows HTML code: <div class="post clearfix" data-post-id="92842173">...</div> <div class="post clearfix"…
-
-1
votes1
answer364
viewsHow to manipulate Combobox
Hello personal I have 2 combobox and I have 1 (one) file with texts and subtexts text 1 <001>ola <002>Hi text2 <001>house <002>hospital .... I want to load this information…
-
-1
votes2
answers9699
viewsHow to get the values of a textbox?
I created an example for you to see. The problem is this. I’m trying to get the value contained in TextBox converting to a string type to be able to use in the MessageBox, but he keeps showing off…
-
-1
votes1
answer128
viewsWhy do I have to run this code twice to rotate the 3d object?
My code’s a bit tricky, but I only got it the way it’s down. Plus I have to run twice to be able to turn the object and I don’t know why. I’d like to understand what’s happening here. var device3d =…
-
-1
votes0
answers61
viewsHow to send email in C#
So much so that I researched, I saw the great difficulty that people have to send email, using the C#platform, so I am here providing the form I found for the realization of this feat.
-
-1
votes1
answer306
viewsGet list of items from a listbox
I am creating a windows form in C# with a listbox and I would like the information saved inside this listbox to be saved in a list to be used in another class.
-
-1
votes1
answer89
viewsProtected methods of a DLL
I have a DLL that has several internal methods, I want to protect these internal methods so that they are called only by the DLL itself. Is there any way to define which methods may or may not be…
-
-1
votes1
answer518
viewsBasic API Rest authentication (C#)
I have an application made in ASP.MVC where I implemented ASP.NET Identity for user registration/login. Now I have to create a Web API Rest with a simple authentication, just a single user and a…
-
-1
votes1
answer55
viewsProblem with Database Connection
Could you help me figure out why you’re making this mistake? Code: using (_connection = new MySqlConnection("Database=test;Data Source=localhost;User Id=root;Password=teste;SslMode=None;")) {…
-
-1
votes2
answers144
viewsError while compiling program
I have these mistakes, being that it’s working! I added the reference, it’s the right BLL folder on the way. I’ve tried and searched for everything but I don’t understand what I have to do. I’ve…
-
-1
votes2
answers778
viewsPost Sends data but webapi captures null
I’m taking this header from the Fiddler. POST http://localhost:8887/api/values HTTP/1.1 Host: localhost:8887 Proxy-Connection: keep-alive Content-Length: 352 Accept: */* Origin:…
-
-1
votes1
answer113
viewsSet comma in a return Json
Guys I’m developing an application in C# with API. It will query and shows the result. Simple thing. But in one of my methods it returns the height of the guy without comma. It comes for example…
c#asked 7 years, 7 months ago Artur Mafezzoli Júnior 441 -
-1
votes1
answer76
viewsHelp to know what is wrong
//Função para permitir somente números e ponto private void ApenasValorNumerico(object sender, KeyEventArgs e) { TextBox txt = (TextBox)sender; if (e.Key != Key.Back) { if (Convert.ToChar(e.Key) ==…
-
-1
votes1
answer1203
viewsDoubt about window.location.href()
I know that window.open() will be open to url in a new window and that the window.location.href() will open on the calling page. It happens that when I use the window.location.href(), I put in…
-
-1
votes1
answer59
viewsDifference between Staticresource and Themeresource UWP uses?
To declare a Textblock with Headertextblockstyle style you can use these two forms where the result is the same: <TextBlock Text="Olá, Mundo!" Style="{StaticResource HeaderTextBlockStyle}" />…
-
-1
votes1
answer81
viewsHow to create a list of locked programs in C#?
I want that when selecting one of the programs from the list of programs installed in Windows, it can be blocked. I want to stop them from being opened, in case, with a password. For example,…
-
-1
votes1
answer905
viewsTitle bar text in the center
The Form title bar text in my Visual Studio 2015 is on the left by default. How do I make it centralized by default? Grateful.
-
-1
votes1
answer259
viewsHow to get specific string text with Regex?
I’m trying to manipulate the return of a string where I always need to get the block Where do select the problem is that my method always returns different strings. For example: SELECT.....…
-
-1
votes1
answer49
viewsReverse checkbox c#
I have this code. You’re reading my checkboxes from top to bottom when they’re all checked. But what I needed was, when he started reading, I wanted him to start reading from 2.9.15 up. Not 2.9.16…
-
-1
votes1
answer198
viewsHow to make a background responsive in c#?
How to relate background_image to window size? Example: Sets my background image, but by changing the window size (minimizing) the image becomes "incomplete", and does not follow the edges acting so…
-
-1
votes2
answers3189
viewsSee if there is a file in a folder c#
I wanted you to check if the file you chose already exists in a certain folder defined at least. If it does not exist, you can copy the file.
c#asked 7 years, 5 months ago Ana Carvalho 389 -
-1
votes2
answers503
viewsSearch in text file and compare with others
I have two string lists. Received and Fixed. Well, I would like with just one lambda expression, scroll through the list Recebido on the list Fixo and if there is no file within Fixo, I save to…
-
-1
votes1
answer1648
viewsHow to refer to Assembly in Visual Studio?
I was trying to create an application that connects with a database. But the methods of SqlConnection.Open(), SqlConnection.State and SqlConnection.Close() are with errors all appear the message:…
-
-1
votes1
answer1802
viewsCopy content from a folder with all subfolders and files into a new one
I’m having a hard time creating a folder inside another one and moving the content into that new folder. The rule is: I unzip a file .zip inside that directory:C:\Teste_Zip\Destino_Teste\Temp/>.…
-
-1
votes1
answer547
viewsEmailing a C#application
It is possible to send an email directly from the application C# without having to use a server? If yes, how to do this? For example, in case the user forgets the password and I want to send a new…
-
-1
votes1
answer659
viewsTake Prefab position and compare with other Prefab within a grid? Unity 3D
I’m developing a tetris-style game, but focused on chemistry. Instead of missing a complete line and scoring, the user needs to form a molecule. For this, each element (H and C) is a different…
-
-1
votes1
answer131
viewsProblems with three Forms and picture box
Hi, here’s my scenario: - Configuration form (name, e-mail and a photo) - ABC form - which has a form that opens by clicking on a ABC form button - BCA form - which has a form that opens by clicking…
-
-1
votes1
answer43
viewsJoin lists without repeating
I have two lists: . I wanted a way to join the two lists randomly without repeating letters and numbers in the same letter in C#, for example:…
-
-1
votes1
answer89
viewsHow to add properties in an Expandoobject()?
I was using the type Dynamic and I’ve been alerted that he has performance issues. How could I make the code below using ExpandoObject ? dynamic dObject = new ExpandoObject(); dObject.a= a; And how…
c#asked 7 years, 3 months ago PauloHDSousa 3,509 -
-1
votes1
answer51
viewsProblem with functions
Hello, I have the following problem, I have a view in the bank that makes a group by, and I have another table GraficoCor, I want to make it every time While of the first function make an increment,…
-
-1
votes1
answer46
viewsSwitch Connectionstring to Appdata/Roaming
My application installed the database . mdf in Appdata/Roaming. Now I probably need to change my path from ConnectionString to this place. How do I do it? I read online about using…
-
-1
votes1
answer371
viewsNullable<Datetime> 01/01/0001
I have a Model field [Column("sdt_dataPagamento")] [Display(Name = "Dt. Pagamento")] [DataType(DataType.Date)] [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")]…
-
-1
votes1
answer331
viewsError calling REST service
Yesterday good, my service worked, except for fields float, but commenting on this part until I have a solution, I was testing and running, in reality an Android APP to consume this service. Today I…
-
-1
votes1
answer213
viewsHow to Integrate a Web Application to Call a C# Biometric Desktop Application
Good afternoon, I need to make the request by the browser (Chrome) by calling a windows form c# on the same computer, which is a biometric application, both use c#. I have both codes, I made through…
-
-1
votes1
answer207
viewsC# | Format Time
I need to format a date as follows: Ex: 08:00 -> is 8h 08:30 -> is 8:30 You can do it right through DateTime.ToString();
c#asked 7 years, 3 months ago Bruno Heringer 1,338 -
-1
votes1
answer333
viewsDelphi => C#: generic function to return billet DV
I’m having problems with a custom Module 11 function (which correctly returns the billet dv of any bank) that already had it in Delphi, and how I’m needing it to implement in a C system#. So I tried…
-
-1
votes3
answers4858
viewsHow to write a date in ISO 8601 type
I’m doing a communication program with Apis online and I’m using a header like DateTime and I needed that date to stay on the ISO 8601 how can I do this ? I’m using this to create the header : var…
-
-1
votes3
answers85
viewsSearching and opening files by name
Well I’d like a code that looks all over the directory @"c:\" with a name I put and open the folder or folders where they are located. Ex: Process.Start(@"c:\" + PastaOndeEstaLocalizadoOArquivo);…
-
-1
votes1
answer78
viewsProcess.Start does not load executable dependencies
I created a code that opens a program, but the program needs the DLLS/Folders - in the folder that is located, so when I run it from the error, it seems that it is not getting the DLLS/Folders (if I…
-
-1
votes1
answer415
viewsCreating reports in C#!
Hello, I’m looking for a library/tool that lets you create reports in c#. There’s Fast Report and Crystal Reports but they both get paid... You wanted something Open Source/Free and you don’t need…
-
-1
votes1
answer31
viewsRole Default Value in a dropdown
I have in my index users, each user has a Dropdown with the Roles, when Get does not show the value that is by default in Dropdown Controller: public ActionResult IndexGestor(string roles) { //query…
-
-1
votes3
answers232
viewsDifference on screen Windows Forms C#
I have a problem with Visual Studio > Windows Forms. When I enable the classic Windows theme and create a project in C# the screen is inside what I want, however, when enabling Aero mode, the…
-
-1
votes2
answers342
viewsHow to receive a javascript value within a c# ASP.NET block
What I’d like to do is convert a value from within a JSON to Double and apply the String.Format("{0:N}", valor_JSON)); so I’d be converting 1000 -> 1.000. However, as already answered, it is not…
-
-1
votes1
answer447
viewsAsp.net Identity Decrypt
You can decrypt the password generated by Asp.Net Identity?
-
-1
votes1
answer74
viewsHow to split an integer number into a string?
String following: 11 blabalba, balbalba balballbal baba 12 balbal13, afafaf14 1414adad1414 I want you to return something like this (separated by split): array 0: 11 array 1: blabalba, balbalba…
c#asked 7 years ago Matheus Miranda 5,375 -
-1
votes1
answer219
viewsRecord Video and Upload C# MVC
I have to record a 5s video on the webcam, after the recording upload this video to a folder. I have already searched several plugins in JS, I used this "…
-
-1
votes1
answer318
viewsHow to configure angular routes with Asp. Net Mvc
I created a controller who calls the Index.cshtml and within the Index.cshtml contains the directive <ng-view> that should render the index.html but it doesn’t work. Controller public class…
-
-1
votes1
answer751
viewsCould not create the driver from Nhibernate.Driver.Oracledataclientdriver, Nhibernate, Version=4.0.0.4000, Culture=neutral,
I am working on an application with NHibernate and Fluent Nhibernate. I’m having trouble with my settings App.config. I don’t know exactly what’s wrong with my settings. I’m getting this Exception:…
-
-1
votes1
answer405
viewsHow to create an image with Hover effect in C#
I’m making an app and I wanted when passing the mouse in the image, she changed the color for a lighter, but I can’t do it in C#...
-
-1
votes1
answer488
viewsHow to perform a Left Join with LINQ C# using my SQL?
Example that works in SQL: select * from Doacoes inner join Projetos on Projetos.IdProjeto = Doacoes.IdProjeto left join Pedidos on Doacoes.IdDoacao = Pedidos.IdDoacao left join Recompensas on…