Questions tagged as '.net'

2
answers

Declaration of an interface with where

I am studying a lot design pattern , as I think they solve a lot and it is very opportune to study them. I got this statement from the Macoratti website and I confess, I could not explain from where . What does that mean? public interfa...
asked by 11.07.2015 / 22:38
3
answers

How to change the structure of a LINQ query at runtime?

I have the following example of a program that implements the EF (Entity Framework). The bank and application structure is defined as follows: Table Pessoa : Primary key field: id_pessoa Field name: nome Field age:...
asked by 27.05.2016 / 01:17
3
answers

Faster way to access properties in a list C #

I have a project that works with a large volume of data, and I need to optimize it to bring results of some calculations in a considerably small time. I know I have several aspects to take into consideration, such as the structure in which the d...
asked by 30.03.2016 / 15:15
1
answer

Concept of class, entity and objects

I'm reading about classes in C #, and an excerpt left me a bit confused. I know that classes are C # objects, and can be used in many ways. My question is in the following sentence: "A class can have both the attributes and methods of a...
asked by 08.05.2017 / 20:20
2
answers

What does an enum with the [Flags] attribute mean and how does it work?

I was seeing how the FileInfo class works and I came across an enum: [Serializable] [ComVisible(true)] [Flags] public enum FileAttributes { ReadOnly = 1, Hidden = 2, System = 4, Directory = 16, Archive = 32, Devi...
asked by 03.01.2014 / 19:13
2
answers

Replace letter by empty or blank, something like Replace ("letters", "")

There is a A1_ZTEL field in the database that is varchar(15) . This way, each user entered a record of all forms, with bar, dot, comma and letter. Now I need to mount a form and read this field from another table that is var...
asked by 11.04.2018 / 21:47
2
answers

ArrayList versus List

What's the point in C # should we give preference to using List instead of ArrayList ?     
asked by 09.08.2017 / 15:01
2
answers

What's the difference when creating a class libray (.net framework) and class library (.net standard) project in VS2017?

What are the differences and uses of these types of projects?     
asked by 08.11.2017 / 12:44
2
answers

Treat Exception by Code

In Visual Basic 6 there was the err.number command where the error code occurred. I have a C # application that treats exception for the message description because I can not find the command that returns the error code. I have a pro...
asked by 10.04.2018 / 19:01
2
answers

Try catch can be replaced with using?

I've always used the blocks try , catch and finally when programming in Java, and when I switched to C # I noticed that some codes change try/catch by using . Example: using (FileStream fs = new FileStream("...
asked by 07.08.2016 / 03:19