Questions tagged as 'c#'

1
answer

DataGridView displaying incomplete id

The grid displays only the first character of the "ID" For example: if the ID is 16 it displays 1; If it is 20 it displays 2; But from 1 to 9 displays correctly ... Codethatselectsdata...privatevoidlixeiraDialog_Load(objectsender,Event...
asked by 30.08.2018 / 22:10
1
answer

I can not search the repository with Nhibernate C #

I'm new as a programmer, sorry if I can not explain clearly, but please tell me what I did wrong and if possible how to do better, I want to improve as a programmer and user here in StackOverflow I'm trying to create a criteria to be able to fet...
asked by 25.11.2018 / 02:13
1
answer

What's the difference between using "equals" vs == in LINQ to Entities?

As I mentioned above, when I say equals of LINQ to Entities I'm referring specifically to the C # reserved word and not to Equals() of System.Object . Source: equals (C # Reference) The following example returns all...
asked by 06.12.2018 / 23:34
1
answer

Validation does not enter the correct "if"

My code should have 4 validations and I'm using if and else if , but it's only doing two of them, see the code below: double salario = 0; double p0 = 1.20; double p1 = 1.15; double p2 = 1.10; double...
asked by 05.12.2018 / 20:58
1
answer

How to restrict certain file extensions and save to the database?

I need to upload images to my database and use the data type as Bytes in the SQL Server database. How do I guarantee that it really would be an image that will be passing to him? I want to leave released only for .jpeg and .png files. Is it p...
asked by 10.02.2014 / 20:23
3
answers

How do I get the value of the dynamically created TextBox?

I have a form that receives an amount of TextBox that should be instantiated, the page then generates the textboxes, however I do not know how I can get the values. hd = Request.QueryString["qtHD"]; mem = Request.QueryString["qtMem"]; hdnum =...
asked by 27.02.2014 / 19:40
1
answer

Private class in C #

I have a class Pessoa.cs private , but I can call it in another class, for example I created a class called Parametro.cs ; I can instantiate the class private Pessoa without the slightest problem. Should not priva...
asked by 01.06.2018 / 13:16
2
answers

Using struct in C #

I have to record customer information. And I used struct to do this. Is it worth doing this? Is it good practice or not?     
asked by 02.06.2018 / 05:06
1
answer

Task ListT showing error Xamarin

I'm creating a Task List
asked by 08.06.2018 / 04:17
2
answers

WCF ERROR: Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata

Well, this error is happening, after I did the procedure to access IIS remotely. Error: Cannot obtain Metadata from http://localhost:xxxx/Service.svc. If this is a Windows (R) Communication Foundation service to which you have acce...
asked by 01.06.2018 / 15:39