Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#:
C#
IEnumerable<DataRow> rows = DataTableObject.Rows.Cast<DataRow>().Where(r => r["EmployeeId"].ToString() == "0123 "&& r["Name"].ToString() == "Abdul");

rows.ToList().ForEach(r => r.SetField("EmployeWorking", "Y"));
rows.ToList().ForEach(r => r.SetField("EmployeeLocation", "Microsoft"));
Posted
Comments
dan!sh 8-Jan-16 4:54am    
It does not work this way. Please check posting guidelines.
yadlaprasad 8-Jan-16 5:01am    
Hi d@nish,
something wrong with above code?
dan!sh 8-Jan-16 5:05am    
This site is not for getting work done by others. As I said, read the guidelines. Here: http://www.codeproject.com/Articles/64628/Code-Project-Quick-Answers-FAQ

No.
You can try one of the online code converters:
Convert C# to VB.NET - A free code conversion tool - developer Fusion[^]
Or
Code Converter | Provided by Telerik[^]

They both normally produce fairly good results - but we aren't here to translate random lumps of code you found on the internet and hope will work for your application! :laugh:
 
Share this answer
 
HI use this
And you can use the following link



[^]

C#
Dim rows As IEnumerable(Of DataRow) = DataTableObject.Rows.Cast(Of DataRow)().Where(Function(r) r("EmployeeId").ToString() = 123 AndAlso r("Name").ToString() = Abdul)

rows.ToList().ForEach(Function(r) r.SetField(EmployeWorking, Y))
rows.ToList().ForEach(Function(r) r.SetField(EmployeeLocation, Microsoft))
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900