<html><body> <% var worker = new Worker(); %> </body></html>
<html><body> <% var worker = new WorkerStatic(); %> </body></html>
public class Worker { int workerCount = 0; public void SetWorkerCount (int count) { workerCount = count; } public int GetWorker () { return workerCount; } public static string Independent() { return DateTime.Now.ToString(); } } public class WorkerStatic { int workerCount = 0; public void SetWorkerCount (int count) { workerCount = count; } public static int GetWorkerStatic () { return workerCount; } public static string IndependentStatic () { return DateTime.Now.ToString(); } }
GetWorkerStatic()
workerCount
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)