Click here to Skip to main content
15,886,362 members
Home / Discussions / C#
   

C#

 
GeneralRe: Adding code to encrypt and decrypt text in textbox with C# 2008 Pin
OriginalGriff9-Jul-14 21:31
mveOriginalGriff9-Jul-14 21:31 
GeneralRe: Adding code to encrypt and decrypt text in textbox with C# 2008 Pin
KaKoten9-Jul-14 23:17
KaKoten9-Jul-14 23:17 
AnswerRe: Adding code to encrypt and decrypt text in textbox with C# 2008 Pin
Eddy Vluggen11-Jul-14 7:19
professionalEddy Vluggen11-Jul-14 7:19 
QuestionC# Questions Pin
shiftwik8-Jul-14 8:32
shiftwik8-Jul-14 8:32 
AnswerRe: C# Questions Pin
Eddy Vluggen8-Jul-14 8:48
professionalEddy Vluggen8-Jul-14 8:48 
GeneralRe: C# Questions Pin
shiftwik8-Jul-14 8:56
shiftwik8-Jul-14 8:56 
AnswerRe: C# Questions Pin
PIEBALDconsult8-Jul-14 9:08
mvePIEBALDconsult8-Jul-14 9:08 
AnswerRe: C# Questions PinPopular
Pete O'Hanlon8-Jul-14 9:19
mvePete O'Hanlon8-Jul-14 9:19 
1. Because the new keyword tells the application to instantiate an object at that point. If we have several different constructors on an object, new is a great way to tell the application that you expect a certain constructor to be invoked at that point. Merely referencing the object wouldn't be a great place to instantiate it because you could instantiate it long before you need it - and this would play hell doing things like building class factories.

2. Get is synctatic sugar that hides the fact that you are actually calling a special method with the prefix get_, so your code has to follow the standards of other methods. Another point to consider is, how would you indicate what you are returning? It's quite common to have some form of lazy initialisation or return choice in the getter, so you have to have some functionality in there to indicate what's going to be returned. Of course, if you don't actually need to do anything, just create an automatic property and you don't have to write a return statement (although one is implicitly created behind the scenes).

3. Yes. The .NET runtime and .NET applications are still PE Format applications.

4. That's just a pattern. While there's no default implementation of it in the framework, it's incredibly trivial to create although, as anyone who's worked with DocView will attest, the DocView pattern is severely limited in what it can do. There are a number of superior patterns available to use, such as MVC.
GeneralRe: C# Questions Pin
Richard Andrew x648-Jul-14 11:00
professionalRichard Andrew x648-Jul-14 11:00 
GeneralRe: C# Questions Pin
Pete O'Hanlon8-Jul-14 11:16
mvePete O'Hanlon8-Jul-14 11:16 
GeneralRe: C# Questions Pin
shiftwik8-Jul-14 21:10
shiftwik8-Jul-14 21:10 
AnswerRe: C# Questions Pin
OriginalGriff8-Jul-14 9:32
mveOriginalGriff8-Jul-14 9:32 
GeneralRe: C# Questions Pin
shiftwik8-Jul-14 21:09
shiftwik8-Jul-14 21:09 
GeneralRe: C# Questions Pin
OriginalGriff8-Jul-14 21:21
mveOriginalGriff8-Jul-14 21:21 
GeneralRe: C# Questions Pin
Erik Westermann11-Jul-14 3:48
professionalErik Westermann11-Jul-14 3:48 
GeneralRe: C# Questions Pin
OriginalGriff8-Jul-14 21:23
mveOriginalGriff8-Jul-14 21:23 
GeneralRe: C# Questions Pin
Richard Deeming9-Jul-14 1:48
mveRichard Deeming9-Jul-14 1:48 
GeneralRe: C# Questions Pin
OriginalGriff9-Jul-14 2:30
mveOriginalGriff9-Jul-14 2:30 
GeneralRe: C# Questions Pin
Nicholas Marty9-Jul-14 4:33
professionalNicholas Marty9-Jul-14 4:33 
GeneralRe: C# Questions Pin
Richard Deeming9-Jul-14 5:03
mveRichard Deeming9-Jul-14 5:03 
GeneralRe: C# Questions Pin
Nicholas Marty9-Jul-14 20:32
professionalNicholas Marty9-Jul-14 20:32 
GeneralRe: C# Questions Pin
Richard Deeming10-Jul-14 1:01
mveRichard Deeming10-Jul-14 1:01 
GeneralRe: C# Questions Pin
Nicholas Marty11-Jul-14 0:48
professionalNicholas Marty11-Jul-14 0:48 
AnswerRe: C# Questions Pin
V.9-Jul-14 1:40
professionalV.9-Jul-14 1:40 
GeneralHelp Pin
gsn19708-Jul-14 8:13
gsn19708-Jul-14 8:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.