Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1349
  • Last Modified:

static final string

for example, static final String CMD_ARMHOME="cmd,1,0";
i understand that it is a declaration in java. what's is the c# equivalent to that? and where do i put that line?
maybe u can do a brief explanation of static final string?
0
DWR200
Asked:
DWR200
  • 2
1 Solution
 
Jase-CoderCommented:
Hi in C# you do

static readonly  String VARIABLE = "JASON";

The readonly and final keywords allow you to do one assignment to the variable if an assignment is no possible when the variable has been declared.
0
 
Jase-CoderCommented:
Hi in C# you do

static readonly  String VARIABLE = "JASON";

The readonly and final keywords allow you to do one assignment to the variable if an assignment is no possible when the variable has been declared.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now