I am using LINQ.I want to dynamically build a lambda expression which would be passed to the where clause of the Query.
i have written the following code:
ParameterExpres sion param = Expression.Para meter(typeof(ty pename),"type") ;
MemberExpressio n member = Expression.Prop erty(Expression .Constant(param ), "Name");
ParameterExpres sion constant = Expression.Para meter(typeof(st ring),...
User Profile
Collapse
-
Lambda Expression Tree
-
WCF service
Hi,
I am trying to run a simple service in WCF.I am getting the following error
Server Application unavailable and check the application event log for details.
When i checked the log it had the following errors
1.aspnet_wp.exe (pid:XXXX) stopped unexpectedly and
2.Failed to execute the request because the ASP.NET process identity does not have read permissions to the global assembly cache. Error: 0x80070005 Access... -
Regular expressions
Hi
i just wanted to know if by using regular expressions in C# i can create regular expression for strings
For eg..for strings like name,fname,lnam e,fullname...wh ich have similar words -
Yes its runtime..it gives the fullpath as the project in which m using the library paths debug folder...its searching it der...but the issue is that my library acceses those text files,so ideally they shud be present in the library.placing those files in the debug folder solves d issue but i feel its not rite way to do itLeave a comment:
-
Path
I think this is really a trivial question to ask,but still i cant figure out d way to do it
I have a class library which refers to certain text files when running .this class library i have referred in another project.the path i have given for the class library o open textfile is System.AppDomai n.CurrentDomain .BaseDirectory+ textfile name...the library did compile ,but when i run the project in which i have referred the library it refers to... -
-
Serialization problem
i have following structure
class DB
{
DBname
Table [] tables
}
class Table
{
Column[] columns
}
class Column
{
---some properties----
}
i have given root element as DB...table and column clases are serializable
at runtime i collect info about columns and tables and fill it in the DB object
on serialising DBi i get error "Error... -
CreateInstance method
what i am doing is i am reading an xml file...one node has the name of the class i need to instantiate...i am getting the name in the form of string...
how to use create instance in dis case??
for eg:on parsing the file i get the name of class in str="abc",i need to instantiate dis class abc with createinstance
hope it is clear..
what shud be done??
thaks in advance -
Thanks
Do you mean to say that running website in filesystem would make a difference??
i have used the following code now
TextReader tr = new StreamReader(Sy stem.AppDomain. CurrentDomain.B aseDirectory + "\\Library\\Nam es.txt");
will dis work with localhost??Leave a comment:
-
Relative paths
Hello all,Can anyone pls tell me how to specify relative paths in a website??
i have created a website and want to access a text file present in the website root directory.i want to know the no. of records in that text file
i have written the following code
int length = new StreamReader(@" \Files\Names.tx t").ReadToEnd() .Split(new char[] { '\n' }).Length;
It is giving file not found exception!
Plz help...
No activity results to display
Show More
Leave a comment: