Click here to Skip to main content
15,897,273 members
Home / Discussions / C#
   

C#

 
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
BillWoodruff26-Sep-15 1:11
professionalBillWoodruff26-Sep-15 1:11 
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
Gerry Schmitz28-Sep-15 6:15
mveGerry Schmitz28-Sep-15 6:15 
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
Kenneth Haugland28-Sep-15 9:18
mvaKenneth Haugland28-Sep-15 9:18 
Questionrun time validation for text box Pin
Member 1198293424-Sep-15 4:38
Member 1198293424-Sep-15 4:38 
AnswerRe: run time validation for text box Pin
Ravi Bhavnani24-Sep-15 4:45
professionalRavi Bhavnani24-Sep-15 4:45 
GeneralRe: run time validation for text box Pin
Member 1198293424-Sep-15 7:04
Member 1198293424-Sep-15 7:04 
AnswerRe: run time validation for text box Pin
OriginalGriff24-Sep-15 5:30
mveOriginalGriff24-Sep-15 5:30 
AnswerRe: run time validation for text box Pin
Gerry Schmitz24-Sep-15 9:01
mveGerry Schmitz24-Sep-15 9:01 
QuestionC# UserControl Inheritance Pin
didydj24-Sep-15 1:40
didydj24-Sep-15 1:40 
AnswerRe: C# UserControl Inheritance Pin
OriginalGriff24-Sep-15 2:19
mveOriginalGriff24-Sep-15 2:19 
AnswerRe: C# UserControl Inheritance Pin
BillWoodruff24-Sep-15 7:13
professionalBillWoodruff24-Sep-15 7:13 
AnswerRe: C# UserControl Inheritance Pin
Gerry Schmitz24-Sep-15 8:56
mveGerry Schmitz24-Sep-15 8:56 
GeneralRe: C# UserControl Inheritance Pin
BillWoodruff24-Sep-15 12:18
professionalBillWoodruff24-Sep-15 12:18 
AnswerRe: C# UserControl Inheritance Pin
didydj28-Sep-15 4:07
didydj28-Sep-15 4:07 
Question(Selenium web driver using c#)How to make the webdrivers.exe path to environment varibales in my local machine Pin
Member 1200855524-Sep-15 0:47
Member 1200855524-Sep-15 0:47 
AnswerRe: (Selenium web driver using c#)How to make the webdrivers.exe path to environment varibales in my local machine Pin
Pete O'Hanlon24-Sep-15 0:54
mvePete O'Hanlon24-Sep-15 0:54 
QuestionNewbie: code doesn't return result, could someone please help? Pin
Member 1200834023-Sep-15 23:41
Member 1200834023-Sep-15 23:41 
Hello,

Apologies for what surely is a very basic question. I'm new to C# and need to write some easy functions for an application we use at work. This application uses a special DateTime as it needs to accommodate unknown date parts, e.g. UNK/May/2015. Ideally I would like to know the difference in months between two dates, but for a start I'm happy with just the year difference (the year will always be known). I've written the following function which throws no errors but it always returns 0. I can see while debugging that StDt.Year and EnSt.Year are integers with the correct year, but it doesn't seem to calculate the PackYears. Any help is greatly appreciated!

[DesignerFunction("Calculates the pack years")]
public static int fnCalculatePackYears(
[DesignerParameter("Start Date (date)")] PFDateTime StDt,
[DesignerParameter("End Date (date)")] PFDateTime EnDt)
{
int PackYears = 0;
int StDtYr = StDt.Year;
int EnDtYr = EnDt.Year;

PackYears = (EnDt.Year - StDt.Year);

return PackYears;

}

Thanks in advance!
Nicole
AnswerRe: Newbie: code doesn't return result, could someone please help? Pin
OriginalGriff24-Sep-15 0:14
mveOriginalGriff24-Sep-15 0:14 
QuestionRe: Newbie: code doesn't return result, could someone please help? Pin
Richard MacCutchan24-Sep-15 1:13
mveRichard MacCutchan24-Sep-15 1:13 
QuestionMAKE AUTOMATIC NUMBER Pin
Saepul Bahri23-Sep-15 17:28
Saepul Bahri23-Sep-15 17:28 
AnswerRe: MAKE AUTOMATIC NUMBER Pin
Pete O'Hanlon23-Sep-15 21:09
mvePete O'Hanlon23-Sep-15 21:09 
AnswerRe: MAKE AUTOMATIC NUMBER Pin
OriginalGriff23-Sep-15 21:48
mveOriginalGriff23-Sep-15 21:48 
QuestionVIEW DATA FROM DATABASE Pin
Saepul Bahri23-Sep-15 17:24
Saepul Bahri23-Sep-15 17:24 
AnswerRe: VIEW DATA FROM DATABASE Pin
aarif moh shaikh23-Sep-15 19:24
professionalaarif moh shaikh23-Sep-15 19:24 
QuestionColor Calculation Pin
RadioButton23-Sep-15 13:27
RadioButton23-Sep-15 13:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.