-
February 25th, 2015, 03:45 AM
#1
Convert code C# 2008 to code C# 2005 ?
I want convert code C# 2008 to code C# 2005, I did not understand the command C# 2008 to switch to C# 2005, see below is the error code can solve the error command do ? run the code in C# 2008 very good
Code:
private void textBox1_TextChanged(object sender, EventArgs e)
{
string str = textBox1.Text.Trim();
if (!string.IsNullOrEmpty(str))
{
// Error in here
Expression<Func<CustomData, bool>> expr = n => GetCondition(n, str);
this.gridControl1.DataSource = this.lstCustomData.Where<CustomData>(expr.Compile()).ToList();
}
else
this.gridControl1.DataSource = this.lstCustomData;
this.gridControl1.RefreshDataSource();
}
public class CustomData
{
// Error in here
public int col1 { get; set; }
public string col2 { get; set; }
public string col3 { get; set; }
public int col4 { get; set; }
}
-
March 2nd, 2015, 09:05 AM
#2
Re: Convert code C# 2008 to code C# 2005 ?
What errors (exactly!) do you get?
Victor Nijegorodov
-
March 2nd, 2015, 10:33 AM
#3
Re: Convert code C# 2008 to code C# 2005 ?
-
March 2nd, 2015, 03:12 PM
#4
Re: Convert code C# 2008 to code C# 2005 ?
Switching back to a previous version just because you don't understand the newer methods is not the way to go.... I suggest learning LINQ and see how easy it can make everything for you
-
March 3rd, 2015, 12:29 AM
#5
Re: Convert code C# 2008 to code C# 2005 ?
I'm looking to understand how the .Net 2.0 and .Net 3.5, I think someone who understands and will move the code.
-
March 3rd, 2015, 12:31 AM
#6
Re: Convert code C# 2008 to code C# 2005 ?
Originally Posted by Nuttyrunner
I tried the link you sent it, the program is not convert to C# 2005
-
March 3rd, 2015, 10:39 AM
#7
Re: Convert code C# 2008 to code C# 2005 ?
Originally Posted by dongtrien
I tried the link you sent it, the program is not convert to C# 2005
Probably should have asked th9s earlier, but what do you hope to accomplish by going back to VS 2005?
-
March 3rd, 2015, 09:45 PM
#8
Re: Convert code C# 2008 to code C# 2005 ?
not necessarily so, I am learn 2 type writing linkq and style of writing standards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|