Guns
C# Data Table issue
https://pastebin.com/DSHwSh0M
based on this program, I need to set the values of the
Old PS A11Y State
in the mergedDataTable
to the values from the initial target file/worksheet and technically the targetDataTable
. what do i need to changed?
Rn this is how it is being done, but for unknown reasons, even after updating the file the values for that column (Old PS A11Y State
) are not being updated;
e.g; on the fist run i.e when the file is not yet synced the data grid view should look like this;
v1;
then after updating the file and re opening the updated file, the data grid view should look like this;
v2;
but instead the datagrid view is still looking like the first version...2 replies
❔ Need help with datetime
I need to create a class which has two fields; name and date. Then create objects of this class. I need to use datetime for the date field. anyone knows what im doing wrong?
so basically;
static void Main()
{
//create intances of Employee;
Employee emp1 = new Employee("James", 25, new DateTime(2000, 5, 1));
//add employees to list
List<Employee> employees = new List<Employee>(4);
employees.Add(emp1);
//LINQ Questions;
//Q1. Return a List of employees that hired after the year 2005
var queryHiredAfter2005 = from emp in employees
where emp.HireDate.Year > 2005
select emp.Name;
foreach (var res in queryHiredAfter2005)
{
Console.WriteLine(res);
}
class Employee
{
public string name;
public string Name
{
get
{
return name;
}
set
{
name = value;
}
}
public DateTime hiredate;
public DateTime HireDate { get; set; }
//Constructor;
public Employee(string _name, int _age, DateTime _hiredate)
{
_name = Name;
_age = Age;
_hiredate = HireDate;
}
32 replies