1
Answer

How to reference/store assemblies from relative path ?

Thyag Raj

Thyag Raj

7y
212
1
I am working on windows application . Please find below the probing of private path in appconfig
 
I want the dll's to be referenced to \Users\xxxx\AppData instead of probing.
 
How can i changes this logic to store/reference the dll's from relative path.
 
I am new to dotnet & windows application .
 
Please let me know your sugeestion.
 
Thanks in advance. 
Answers (1)
0
Surya Kant

Surya Kant

NA 1.6k 149.6k 7y
Hi Shashank
Yes it's possible;
check the bellow code;
 
interface MyDemoInterface
{
void getdata(MyDemoInterface ie);
 
 
class DemoInterface:MyDemoInterface
{
int no { get; set; }
public string name { get; set; }
public void GetData(DemoInterface dd)
{

}

public void getdata(MyDemoInterface ie)
{
throw new NotImplementedException();
}
Hope this helpfull.
0
Manas Mohapatra

Manas Mohapatra

NA 29.3k 3.3m 7y
In the interface, you can specify the property:
 
public interface IPolicy
{
   string Name { get; set; }
}
 
You need to implement it in implementation class:
 
public class MyPolicy : IPolicy
{
   public string Name { get; set; }
}
0
Ankit Sharma

Ankit Sharma

NA 8.8k 140.8k 7y
Hi Shashank,
 
Interfaces in C# don't contain fields
 
https://stackoverflow.com/questions/2115114/why-cant-c-sharp-interfaces-contain-fields