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
answers42
viewsOpen secondary pages in a particular Aspnet Core space
I have a page where I use the @renderBody to open my main pages, but the need arose to get a submenu and need the following pages to be opened in a certain space, but when shooting the…
-
1
votes0
answers265
viewsAdding Partial Views to my main page via a modal
I own a page with a button that calls a modal and in this modal there is a table with the products, that when I click on a record of the products it is added on my page. Adding only the first…
-
1
votes1
answer161
views -
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
votes0
answers81
viewsBag nhibernate with key null
Hello, Does anyone know if it is possible to use nhibernate Bag with Key Null? In a table some records have several related records, one for many, but not always, sometimes a region will not have…
-
1
votes0
answers228
viewsUsing asymmetric encryption between Xamarin PCL Client and Web Api
I have a problem creating an asymmetric encryption between my client App using Xamarin Forms (PCL) and the server (Web Api). I did it using symmetry and they asked me to modify it. I already do…
-
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
votes1
answer46
viewsNew position X and Y depending on direction and distance?
I’m doing a mini shooting game on XNA but I’m not able to imagine how to calculate the following: Knowing the position of the center of the image, the direction in which it is pointing and the…
-
1
votes1
answer97
viewsFirebird utilities on C#
How to use library resources Firebird in the C#: FbValidation, FbLog and FbStatistical? I couldn’t find any documentation of Firebird that could help me.…
-
1
votes1
answer975
viewsAdd Xamarin.Forms Package Problems
I’m starting some projects with Xamarin Studio, I’m having some problems and I still can’t solve always appear these 2 errors, I looked at a solution in stackoverflow.com, but the solutions given…
-
1
votes0
answers110
viewsError :An Exception occurred while initializing the database. See the Innerexception for Details
Someone could help me in this era that I always come across him and after numerous attempts, I can not find this error, I am developing an application in MVC 3 exploring more this part of the Code…
-
1
votes1
answer33
viewsFit the Columns header into a DGV, C#
Is there any way to fit the columns in a DMV so that not on the space (Follows the img as example). Or Resize the DGV to go back to the required size columns? at runtime. I’m using direct connection…
c#asked 8 years ago Maurício Sanches 487 -
1
votes1
answer994
viewsFormat number in reportviewer?
I’m trying to format a number on ReportViewer and I’m not getting it, so I’m trying to use the function Format of TextBox in the ReportViewer. The number is a code and I’m trying to fill it with 3…
-
1
votes1
answer121
viewsHow to receive multiple parameters in the Onnavigatedto windowsPhone 8.1 event
Good night I’m wearing the frame.navigate to switch pages and pass an object as parameter in windowsphone so far all quiet my doubt is how do I pass another parameter that comes from another page…
-
1
votes1
answer47
viewsWhat is the equivalent of the Handler clause in C#?
I’m following this one tutorial to try to get Skype to automatically accept lost friendship. The tutorial is in VB and I have to translate code to C# the problem is when I got to part of Handler, i…
-
1
votes0
answers100
viewsVariable loses value before operation C#
I haven’t dealt with C#for a while, I’m making a simple code, to perform simulations on demand and process data, applying FIFO. My problem is regarding the variable attributes of the Fila class, I…
-
1
votes1
answer58
viewsHow do I recover filters from a query?
Hello. You can find out which filters, sorters, etc were used in a query? Example: public class Program { class Produto { public int Id; public string Nome; public Produto(int id, string nome) {…
-
1
votes1
answer842
viewsCustomer search by Name/Phone/Cpf Javascript/C#
I have a page that lists client, and I need to do a name search, I have the method that does the problem research and how to integrate it with the front-end, I looked for examples on the internet…
-
1
votes0
answers463
viewsUse two CSS classes in C# Razor MVC
I want to use two CSS classes in Razor. Is it possible to do this? Because I’m not getting it. Here’s what I’m doing: <div class="form-group"> @Html.LabelFor(model => model.ativo,…
-
1
votes0
answers195
viewsHow to insert a chart as subreport in WPF Report Viewer
I am developing a WPF application and need to insert some charts in a report. I have created two files. RDLC one called Infographic and the other Sub-Fographic. In my subreport I would like to add a…
-
1
votes1
answer308
viewsWinsock (VB6) vs Socket in C#
I have a code on VB6 that uses MSWINSCK.OCX to send commands to a device, the code is below. But I have to switch to C# and I’m trying to use the Sockets class, the problem I’m facing is that the…
-
1
votes1
answer79
viewscalling Enum for value
I created an Enum: public enum EnumTipoBoleto { VazioErro=0, ConfigInicial = 1, Mensalidade = 2, Outros =3, DifMensal =4 } Now in some places I have the number and want to convert to Enum var…
-
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
answers874
viewsI can’t update a reference
I have an MVC project. At Solution are hanging some auxiliary projects. Well, it turns out that I’ve added a few references and when I start the project it gives me the error of saying that one…
-
1
votes0
answers234
viewsaps.net does not call javascript in code Behind
I would like to call my code a function in javascript that is found in my html. It follows below my codes HTML <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs"…
-
1
votes1
answer438
viewsFast and continuous change of the background color of a Panel
I’m trying to get a panel to constantly change color with the following code while (true) { panelColor.BackColor = Color.Blue; Thread.Sleep(500); panelColor.BackColor = Color.Red; Thread.Sleep(500);…
-
1
votes0
answers148
viewsXml Nfse (Notablu)
Hello, I’m having trouble finding decent documentation to integrate with WebService of notablu, I need at least a template of what an XML would look like to send (preferably with caption of what…
-
1
votes0
answers29
viewsSolidworks PDM API - Iedmbomview.Getrows does not return the same items to the BOM that are in the PDM
I have a C# routine that exports BOM, but when Validei, the 2 items marked in the image are not returned by the Getrows routine of the Iedmbomview class. Items are normal in Solidworks. And when I…
-
1
votes0
answers49
viewsLink sends null array
I have a search screen and need to send a parameter as array, this part was quiet, the big problem is that this screen is paged, so in the page change links I put to send this parameter, but it is…
-
1
votes2
answers544
viewsChange Color of an Error Message using Annotation
Where can I change the color of that ErrorMessage?…
-
1
votes0
answers26
viewsConfigure string Connection for different environments
I would like to know if it is possible to configure a connection string for two intended environments, for example, the debug and the release. That is, when debugging, the connection string will be…
-
1
votes1
answer945
viewsHow to control a Radiobuttonlist via code
I am using C# Asp.net web Forms I have two Radiobuttonlist <asp:RadioButtonList ID="rblGrupo" runat="server" AutoPostBack="True" CellPadding="5"…
-
1
votes2
answers182
viewsLocal database (serveless) not modifiable with update
Setting: I’m developing a small app WinForm in C# to distribute to sellers to assemble their quotes more quickly and would like to store simple information such as budget issued and registered…
-
1
votes1
answer107
viewsXmltextreader.Getattribute returns the null value
I made a base code in XML and I would like to import the attributes and values according to the code: <?xml version="1.0" encoding="UTF-8" ?> <!-- MAIN SCRIPT FILE FOR JAVA 7u80 MINECRAFT…
-
1
votes1
answer1419
viewsAccess a specific row and column from a C#list
How do I make a multidimensional list, and that I can add elements like this: List<List<String>> listaMultidimensional = new List<List<string>>();…
-
1
votes3
answers807
viewsRemove row from an array
How do I remove the line without getting blank? N7 G90 N8 G26 RA 10.840 N9 G54 G92 X115.00 Y25.00 N11 C5 N12 D14 N13 G42 G01 X76.3276 Y-19.86 Having to stay that way: N7 G90 N8 G26 RA 10.840 N9 G54…
-
1
votes2
answers75
viewsCan I access a Web Api from Windows Phone?
I developed an Api that communicates with my database and put it on IIS. Testing in Windows Forms applications, the search of the api data works normally, but when I try to run it inside the Windows…
c# winforms api visual-studio-2013 windows-phoneasked 8 years, 11 months ago André Morais Martins 367 -
1
votes1
answer283
viewsHow to use Radiobuttons in Xamarin Cross Platform?
I’m a beginner in the universe Xamarin. How to insert RadioButton for "Male" and "Female" in Cross Platform in the shampoo?
-
1
votes1
answer190
viewsPick up Variable from one Config directly on in another Config
A doubt. Is it possible to take the value of a variable from one config directly within the other config? Possible example below. Config1.config: <add key="webservice" value="http.teste.com"…
-
1
votes1
answer592
viewsScroll bars of the dataGridView c#
The option ScrollBars is as Both, but they’re not showing up at all. I don’t even have the code to exemplify it. Someone’s been there before? I’m carrying a datagridview, but there are appearing the…
-
1
votes2
answers106
viewsError changing static property value
I have my class DadosConexao, this class is responsible for storing the connection string of the database, it contains the following properties: A statistical property StringConexao. isServ…
-
1
votes2
answers609
viewsmanipulating Datatables.net data with Json [like manipulating json to display img in the column]
I am mounting a table with the JS framework Datatables I process the data via Server-side through the JSON in the first column I would like to display a photo,the name of this photo comes via JSON.…
-
1
votes1
answer57
viewsRelation between entities returns null
I’m having difficulty checking a parameter in a relationship between Historico and Login. public class Historico { public int ID { get; set; } public virtual Login login{ get; set; } public DateTime…
-
1
votes1
answer212
viewsWCF and Summer Time
I have a date conversion problem in WCF. I get a Json a Datetime in Unix format "\/Date(1477320927000)\/" - 24-10-2016 12:55:27. Wcf receives this date as 24-10-2016 14:55:27. This giving a…
-
1
votes1
answer170
viewsHow to add query in a Datagridview?
I managed to make Inserts and Updates. I downloaded this file: using System; using System.Collections.Generic; using System.Linq; using System.Text; using MySql.Data.MySqlClient; using System.Data;…
-
1
votes2
answers2406
viewsGeneration of Logs with Nlog?
I’m using the Nlog, and for each client logged into the system I would like to create a log generation behavior as follows: [nome-cliente-1]-[dataAtual].txt [nome-cliente-2]-[dataAtual].txt Ex:…
-
1
votes2
answers134
views'system.outofmemoryexception' while opening . dbf 300 mega file
I try to open a file . dbf from 300mg in my code, but this error appears '$Exception. Message' threw an Exception of type 'System.Outofmemoryexception', a smaller file of 300kb is open normally, I…
-
1
votes0
answers134
viewsHow to capture camera image in real time - C#
How would you capture the real-time image of a camera from an android phone for example? I mean, with "real time," it would be like I was analyzing every time the camera was activated for this.…
-
1
votes1
answer1022
viewsCheck Read and Write Permission in folder with C#
I would like to check if the user has read and write permission in a given path. Update: The folder will most often be in a network path.
-
1
votes0
answers43
viewsLogoff ASP NET / HTTPS CAUSES SECURITY ERROR
Hello good morning, I have an Asp net application, which makes use of https security, however at the time of logoff it causes an error message, someone has already gone through it?…