NET Caching Library Help
GetLastDayOfWeek Method
Example 




KellermanSoftware.NetCachingLibrary Namespace > SmartCache Class : GetLastDayOfWeek Method
Gets the last day of the week.
Syntax
'Declaration
 
Public Function GetLastDayOfWeek() As System.DateTimeOffset
'Usage
 
Dim instance As SmartCache
Dim value As System.DateTimeOffset
 
value = instance.GetLastDayOfWeek()
public System.DateTimeOffset GetLastDayOfWeek()
public: System.DateTimeOffset GetLastDayOfWeek(); 
public:
System.DateTimeOffset GetLastDayOfWeek(); 

Return Value

DateTimeOffset.
Example
//Create a Primary Memory Cache with a backing File Cache
string directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "KellermanSoftware", "NetCachingLibrary", "Tests");
SmartConfig config = new SmartConfig(new MemoryCacheProvider(), new FileCacheProvider(directory));
            
//Specify UserName and LicenseKey for Licensed Mode
//config.UserName = "my user name";
//config.LicenseKey = "my license key";
            
//Instantiate the cache
SmartCache cache = new SmartCache(config);
            
//Get the last day of the week
DateTimeOffset lastDayOfWeek = cache.GetLastDayOfWeek();
            
Console.WriteLine(lastDayOfWeek);
'Create a Primary Memory Cache with a backing File Cache
Dim directory As String = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "KellermanSoftware", "NetCachingLibrary", "Tests")
Dim config As New SmartConfig(New MemoryCacheProvider(), New FileCacheProvider(directory))
            
'Specify UserName and LicenseKey for Licensed Mode
'config.UserName = "my user name";
'config.LicenseKey = "my license key";
            
'Instantiate the cache
Dim cache As New SmartCache(config)
            
'Get the last day of the week
Dim lastDayOfWeek As DateTimeOffset = cache.GetLastDayOfWeek()
            
Console.WriteLine(lastDayOfWeek)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SmartCache Class
SmartCache Members