Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
GeneralRe: Creat New Security Group At AD Pin
treuveni25-Jul-11 23:57
treuveni25-Jul-11 23:57 
GeneralRe: Creat New Security Group At AD Pin
Shameel27-Jul-11 1:52
professionalShameel27-Jul-11 1:52 
AnswerRe: Creat New Security Group At AD Pin
Dave Kreskowiak26-Jul-11 1:53
mveDave Kreskowiak26-Jul-11 1:53 
GeneralRe: Creat New Security Group At AD Pin
treuveni26-Jul-11 4:57
treuveni26-Jul-11 4:57 
QuestionStrange Syntax- public string NewPassword { get; set; }and more Pin
Bram van Kampen25-Jul-11 15:33
Bram van Kampen25-Jul-11 15:33 
AnswerRe: Strange Syntax- public string NewPassword { get; set; }and more Pin
PIEBALDconsult25-Jul-11 16:06
mvePIEBALDconsult25-Jul-11 16:06 
AnswerRe: Strange Syntax- public string NewPassword { get; set; }and more Pin
Mark Salsbery25-Jul-11 17:44
Mark Salsbery25-Jul-11 17:44 
AnswerRe: Strange Syntax- public string NewPassword { get; set; }and more Pin
Matt Meyer26-Jul-11 5:30
Matt Meyer26-Jul-11 5:30 
Long reply coming...
Bram van Kampen wrote:
public string NewPassword { get; set; }

What on earth does it mean, and how does it fit in the Language.

It create a property with get/set accessors. There will be some code auto-generated by C# to fill in the bodies for get/set. Since you're a C++ guy, you can think of that line automagically creating the following (hopefully familiar) C++ code:
private: string m_NewPassword;
public:
  string get_NewPassword() {
    return m_NewPassword;
  }
  string set_NewPassword(string Value){
    m_NewPassword = Value;
  }

It is also totally unclear to me which part of an operation is executed on the Server, and which on the Client, or how to control this.

I assume this is a Web Site/App. All C# is always executed on the server. Client browsers are only guaranteed to understand XML, X/HTML, CSS, JavaScript/ECMAScript (probably more). This line can get blurred due to auto-wiring up events, AJAX calls back to the server, runat="server" on script tags, etc. If you give examples, we can probably help better show what executes where.
I understand that #include is out in C#,actually the whole C-Pre-processor is out, which robs me of a number of well tried and tested debugging methods.

File includes are handled in VS as you add/remove them from the project. The .csproj file maintains a list of the file included (can be visually inspected by opening it in a text editor). There's no separation of definition and code, so there's no C# equivalent of header files. There is still extremely basic preprocessor directives, but only to the extent of what's described at C# Preprocessor Directives[^]. As for debugging, you can look into the System.Diagnostic[^] namespace to see if it will suit your needs (or at least help create a replacement for what you're used to).

Global Variables are out to, but, there is something called a 'namespace'

Namespaces are pretty much the same as C++ namespaces. There's no double-colon notations, and everything is dot-qualified. You declare a full namespace in a single line, or you can declare them individually for nested namespaces. The following are equivalent:
namespace A.B.C {
  public class X {
  }
}
// And 
namespace A {
  namespace B {
    namespace C {
      public class X {
      }
    }
  }
}

As you had said, there are no global-scope variables/constants. However, a workaround can easily be achieved by wrapping your 'globals' into a static class like so:
public static class GlobalVars {
  public static int global_counter = 0;
  public static string global_string = "Yep.";
}


The Third question is, does the framework code generated by 'Visual Web Developer 2010 Express' keep track of internet Session Status, or do I have to write substantial code myself to ensure that the database the site is using is:
-Aware of Other Users
-Arbitrates between DB Updates
-Remains consistent

The web site/app will automatically keep track of sessions for the visitors to the site via a Session state[^] collection on the Page object. However, the sessions are unaware of other sessions currently active on the site. It is more of a collection of objects that are stored on the server (in memory or database) and associated with a received session ID (via cookie/url value). There is an Application collection (System.Web.HttpApplicationState[^]) that does maintain consistency between all site visitors and can share data. You will need to take additional steps to ensure that the read/writes to the Application object are thread-safe (usually via Application.Lock/Unlock).

However, your question about the database maintaining consistency, arbitrating updates, and being multi-user aware is not handled by anything automatically in the web side of things. Database transactions (System.Data.Common.DbTransaction[^]) can be used to help maintain consistency and arbitrate database updates. Making your database code be multi-user aware will likely have to be created by you (depending on what the awareness needs to be).
AnswerRe: Strange Syntax- public string NewPassword { get; set; }and more [modified] Pin
Herboren29-Jul-11 11:10
Herboren29-Jul-11 11:10 
GeneralHello all people, Pin
electrician_man25-Jul-11 6:11
electrician_man25-Jul-11 6:11 
GeneralRe: Hello all people, Pin
David198725-Jul-11 6:14
David198725-Jul-11 6:14 
GeneralRe: Hello all people, Pin
DaveyM6925-Jul-11 8:30
professionalDaveyM6925-Jul-11 8:30 
Questiondata filter options for grid Pin
dessiymartin24-Jul-11 23:51
dessiymartin24-Jul-11 23:51 
AnswerRe: data filter options for grid Pin
Dave Kreskowiak25-Jul-11 1:49
mveDave Kreskowiak25-Jul-11 1:49 
AnswerRe: data filter options for grid Pin
PIEBALDconsult25-Jul-11 2:44
mvePIEBALDconsult25-Jul-11 2:44 
AnswerRe: data filter options for grid Pin
robertalis26-Jul-11 1:48
robertalis26-Jul-11 1:48 
QuestionHow can I check if my IIS is alive using C#? Pin
goldsoft24-Jul-11 4:17
goldsoft24-Jul-11 4:17 
AnswerRe: How can I check if my IIS is alive using C#? Pin
Mark Salsbery24-Jul-11 8:03
Mark Salsbery24-Jul-11 8:03 
Questionlooking for regex format Pin
Gali197822-Jul-11 21:44
Gali197822-Jul-11 21:44 
AnswerRe: looking for regex format Pin
l a u r e n23-Jul-11 1:46
l a u r e n23-Jul-11 1:46 
AnswerRe: looking for regex format Pin
PIEBALDconsult23-Jul-11 4:07
mvePIEBALDconsult23-Jul-11 4:07 
AnswerRe: looking for regex format Pin
OriginalGriff23-Jul-11 22:05
mveOriginalGriff23-Jul-11 22:05 
QuestionEF 4.1 Pin
mehrdadc4822-Jul-11 21:37
mehrdadc4822-Jul-11 21:37 
AnswerRe: EF 4.1 Pin
Mark Salsbery23-Jul-11 14:37
Mark Salsbery23-Jul-11 14:37 
GeneralRe: EF 4.1 Pin
mehrdadc4823-Jul-11 18:21
mehrdadc4823-Jul-11 18:21 

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.