Edit, as per these comments:  Do you mean &quot;Property&quot; vs &quot;Field&quot;? public String S1; vs public String S2 { get; set; } –  Exactly dana, i mean the same. –  Asad: you really need to try to use some other term to describe what you mean so that we can better understand your question. C# does not have global variables. The fields you can define in C# are not global - they are members of the class type. –   Hi fellas, Need your expert views over the difference between Field and Property. As in my project, I have used certain global variables which later on i changed to 'Properties' . My manager is asking what is the benefit of using Properties of variables instead of Fields. Although I have replied him that Property provides a kind of secure/safe/indirect access to Field instead of modifying them directly if they are declared public or protected. But Please provide me with some more convincing arguments. Thanks and Regards @Asad: You should get your terminology right: Fields are not Global Variables, C# does not have global variables (as a few commenters mentioned: you can simulate global variables, but you should not do that).
In C#, what makes a field different from a property, and when should a field be used instead of a property?
There are 100 ropes in a bag. In each step, two rope ends are picked at random, tied together and put back into a bag. The process is repeated until there are no free ends. What is the expected number of loops at the end of the process? revoking apex managed sharing permission I'm using apex managed sharing to grant permissions very similar to how it is done in this example trigger:   However, I also need the ability to revoke or delete this access and having it revert to private. The reason for this is my understanding is that there are only two access options for managed sharing access 'read' or 'edit' with no 3rd option of 'none' or 'private'.  Reference:   I've tried adding the shares to a list and deleting the list and I'm getting the error: DELETE_FAILED, cannot delete owner or rule share rows,   I also noticed there is a field on the share object 'isDeleted' this field however is not writable.  Does anyone have experience revoking or deleting these permissions once they've been created?  Thanks! Square roots -- positive and negative Access user fields? $account = \Drupal::currentUser() loads the user object into $account, but how do I access custom fields I've created on the user object (via the admin UI)?  With dpm($account) I can't see any of my custom fields. I am looking for a good GTD (todo/task/project management) app that has cloud sync. I'd like it to be on my iPhone, iPad and Mac. Web app would be nice, too.  OmniFocus is the closest thing I've found but it seems too expensive.  Things don't have clound sync... only WiFi sync is available for Things.  Do you know of any GTD app I'm looking for? Thanks! Hide or disable form options? Possible Duplicate:          On a create/edit form, where the options available to the end user will depend on their previous input, in order to give the user some guides on how to fill the data, we shall:   Disable the controls and enable them only when the pre-requisites are meet. Hide them instead Do nothing Other options   Example: when asking who is the legal representative of someone, the form will contain a combobox with the following options: the own person, their parents or someone else. Only in the case the user chooses someone else, he was to fill a textbox telling who.  Which option will provide the best user experience? UK visit visa: What documents prove genuine relationship with the visitor? In the UK immigration rules for visitor visa  it states if;      Funds, maintenance and accommodation provided by a third party      V 4.3 A visitor’s travel, maintenance and accommodation may be   provided by a third party where the decision maker is satisfied that   they:      (a) have a genuine professional or personal relationship with the   visitor;and      (b) are not, or will not be, in breach of UK immigration laws at the   time of decision or the visitor’s entry to the UK; and      (c) can and will provide support to the visitor for the intended   duration of their stay.   I'm a UK  citizen. I'm planning to invite my brother-in-law and another close friend to the UK. In my invitation letter, I have clearly mentioned that I'm going to provide them accommodation only. They have prove sufficient funds to support themselves. I have sent them an invitation letter along with a copy of my passport and tenant agreement.   What other documents do I need to provide to indicate that it is a genuine professional or personal relationship with the visitor? Possible Duplicate:          There are several tarballs (e.g. Firefox, Eclipse, Zend Studio and ...) that have executable files in them, that we can extract and run. but this executable will be available only for the user that extracts it.  If we want to make it available for all users we should move it to some location like /usr/share, /usr/local/share/, /opt/, ... and give appropriate permissions, make an executable file in /usr/bin/ and so on...  I want to make a deb installer file that does them all! How to do it? How can I check which songs or videos that I purchased from the iTunes Store have DRM restrictions?  All of the mobile OSes are very impressive to me at the moment, and I'm thinking about trying a non-iOS device again. I want to know now the impact it has on my Apple-sourced music collection though.  Is there a date cut-off for purchases when items went DRM free? Auto incrementing field based on groups within feature class? I am needing to auto increment a field based on groups within a feature class. I have 8 plots within a given polygon and I need to assign them an ID from 1-8 for each set of plots within each polygon. The polygon would have its own unique ID number to be used to group the plots.  I assume it would be an alteration of this:  rec=0 def autoIncrement():  global rec  pStart = 1   pInterval = 1   if (rec == 0):    rec = pStart   else:    rec = rec + pInterval   return rec Every countably generated sigma algebra is generated by a random variable Flow On Schedule I"ve created a flow that I'd like to run monthly on the 7th day of each month. How can I do this with scheduled apex. I have no experience writing apex from scratch. Any suggestions or starting off points appreciated.  Thanks,  Kris Creating a DateTime in a specific Time Zone in c# I'm trying to create a unit test to test the case for when the timezone changes on a machine because it has been incorrectly set and then corrected.  In the test I need to be able to create DateTime objects in a none local time zone to ensure that people running the test can do so successfully irrespective of where they are located.  From what I can see from the DateTime constructor I can set the TimeZone to be either the local timezone, the UTC timezone or not specified.  How do I create a DateTime with a specific timezone like PST? Call blocking for iPhone? How do I block unwanted callers without jailbreaking? Dataset collapsing/reducing On Chrome on Android, code blocks on the mobile site have no syntax highlighting, are not a monospaced font, and words are wrapped.  Mobile site on mobile browser:    Desktop site on mobile browser:    Inline code has the same issue, it isn't a monospaced font.  It has been this way for as long as I can remember. Wouldn't be surprised if this is a dupe. I have an external hard drive and I did something which I shouldn't have done, and I am annoyed that many files are prompting me about Administrator permissions to move a folder.  They are regular files.  How do I reset all the permission on the external hard drive? In the Prisoner of Azkaban, Harry and Lupin could practice the patronus on the boggart, but when Harry was in the final task in the Goblet of Fire, he tried to use the patronus on the boggart, it didn't work and he then moved on to use ridikkilus.  Why could he use a patronus against the boggart, but then not in another? Interpretation of Shapiro-Wilk test I'm pretty new to statistics and I need your help. I have a small sample, as follows:    H4U   0.269   0.357   0.2   0.221   0.275   0.277   0.253   0.127   0.246   I ran the Shapiro-Wilk test using R:    shapiro.test(precisionH4U$H4U)   and I got the following result:   W = 0.9502, p-value = 0.6921   Now, if I assume the significance level at 0.05 than the p-value is larger then alpha (0.6921 > 0.05) and I cannot reject the null hypothesis about the normal distribution, but does it allow me to say that the sample has a normal distribution?  Thanks! What are valid values for the id attribute in HTML?