Zexor
Well-known member
- Joined
- Nov 28, 2008
- Messages
- 520
- Programming Experience
- 3-5
I am trying to have an optional Date value in one of my sub but since you cant set Date to nothing, this doesn't work. And i cant set it to the Date.minvalue inline.
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
so, i went and set it to some date in the past.
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
what would be the proper way to handle the default value for an optional Date?
	
		
			
		
		
	
				
			
			
				VB.NET:
			
		
		
		Private Sub abc (ByVal A As String, Optional ByVal B As Date = Nothing)
End Subso, i went and set it to some date in the past.
			
				VB.NET:
			
		
		
		Private Sub abc (ByVal A As String, Optional ByVal B As Date = #1/1/2001#)
End Subwhat would be the proper way to handle the default value for an optional Date?
 
	 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		