Hello, I have problem, when converting Windows application from .NET2.0 to .NET3.5.
I do this like so:
1. In Win XP I start VS2008 and open my solution project which consists of 4 projects;
2. On all of these 4 project Properties window in tab "Application" I select target framework value ".NET Framework 3.5"
3. I rebuild the solution,...
I have the following method:
object GetIndexer()
The result of the method is an indexer of the type:
SomeCollection<T>
Now T can be anything, by I know that each T extends the type Y.
I tried casting
SomeCollection<Y> result= (SomeCollection<Y>) GetIndexer()
It didn't work.
What I need to know is how to access a property for ...
Hello everyone. Is there a way to get a specific element (based in index) from a string array using Property. I prefer using public property in place of making the string array public. I am working on C#.NET 2.0
Regards
...
Hello..Masters of Asp.Net,
I'm trying to generate PDB files for an ASP.NET(v2.0) Website. I'm using Aspnet_Compiler.exe and passing "-d" option to generate the PDB files. But when I inspected the generated dlls using ILDASM it had the following DebuggableAttribute on them.
// .custom instance void [mscorlib]System.Diagnostics.Debugga...
Hi there
I have a class like this:
ChartAccountAllocation allocation = new ChartAccountAllocation(Convert.ToInt64(ViewState["ChartAccountAllocationID"]));
frmvwMainProfileDetail.DataSource = allocation;
There is a bug on the second line and it saying that [System.InvalidOperationException] = {"Data source is an invalid type. It must...
I have two entities say Customer and Order which exist on their own and have no relationship defined in a mapping file.
Now I want nhibernate to give me the result of the following query:
select customer.id,customer.name from customer,order
where customer.id = order.id
and order.status = "Open"
I tried to use a projection but when ex...
How can this code compile? The code below in the operator int CAN access a private variable of the class MyValue? Why?
class Program
{
static void Main(string[] args)
{
Myvalue my = new Myvalue(100);
Console.WriteLine(my + 100);
Console.Read();
}
}
public class Myvalue
{
private int _myvalue;
...
You're stuck with targeting .NET 2.0 in Visual Studio 2008, but you'd like to use all the latest goodness from .NET 3.x features, like:
LINQ
Extension Methods
Lambdas
What can one do to enable this awesomeness?
EDIT: I had not originally found the post: http://stackoverflow.com/questions/173080/c-net-3-0-3-5-features-in-2-0-using-v...
I have a web application project and a web service project in the same solution, and I want to be able to use Javascript (jquery) to make calls back to the web services. How can I do this in a way that wont require me to change the code for production, since it debugs on a different port so I can't just use a normal path to it.
Thoughts...
Hello StackOverflow. I have an interesting problem.
I am developing for a .Net2.0 solution. I have finished my development and checked my source in [er, to a local Clearcase stream - don't ask, this just means I'm done dev]. This source is, and must remain .Net2.0 Vs2005 compliant.
Unit testing is somewhat more lax. I would like to tak...
I am doing a project on FTP file-transfer using FtpWebRequest class. While transferring the file, if my network connection gets disconnected the file in the receiving end gets hanged. I am not able to process further even though I re-establish my network connection. After some time the file gets removed; then I am able to put the file ag...
I have the following ASP page:
<asp:Content ID="Content2" ContentPlaceHolderID="ShellContent" runat="server">
<form runat="server" id="AddNewNoteForm" method="post"">
<fieldset id="NoteContainer">
<legend>Add New Note</legend>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
...
I'm developing an application with plugins. I have a separate API assembly with all the API interfaces.
The main application dynamically loads the plugins from dlls:
object pi = Assembly.LoadFrom(plugin.AssemblyPath)
.CreateInstance(plugin.ClassName);
and then i'm casting it to the actual plugin type:
IPlugin pluginIns...
Brief question
What command can I use to make my DataSet refresh it's connection to the SQL Server before I go on to work with the DataSet object?
I'm working with C# in .Net 2.0
Much longer version of the same question with specifics
I have a database application that is often left running for several hours between manually instigat...
I want to build 2-dimentional collection where i need unique combination of key value pairs. For example Domain "Company" (Id: 1) can have MachineName "Machine1" and "Machine2", but cannot add another MachineName "Machine1" again. Another Domain "Corporate" (Id:2) can have another machineName "Machine1".
here my collection will be like ...
I have a generic List (of Foo) which contains n objects of Type Foo. One of the properties of Foo is PropertyA. PropertyA can be one of ValueA, ValueB or ValueC. Is there an easy way of splitting this into three seperate Lists, one for ValueA, one for ValueB and one for ValueC?
I can write some code which loops the original list and add...
Hi all
Based on previous question, I've changed the context as follow:
I have abstract class called Tenant and CustomerList. The Tenant in this case is like owner of the application for multi tenant application model and CustomerList is a collection of Customer class.
The relationship between these 2 class are Many to One relationshi...
I have an abstract class as follow:
class BaseReturnType { }
class DerivedReturnType : BaseReturnType { }
abstract class BaseClass<T> where T : BaseReturnType
{
public abstract T PolymorphicMethod();
}
class DerivedClass : BaseClass<DerivedReturnType>
{
public override DerivedReturnType Polymorp...
Hi all,
I have a list of 300,000 + items.
What i am currently doing with the list is validating the Address and writing both the original address and corrected address to a specified file.
What i'd like to do is split the list evenly among a given number of threads and do processes on them concurrently.
Can anyone help me with an exampl...
is there any documentation on changes that i might hit when migrating an app from dotnet 2.0 to 3.5. Its my understanding that this is not really a core runtime change but rather an addition of a bunch of new libraries (LINQ, etc). Assuming i am correct, should I have to change any 2.0 code at all to compile successfully in 3.5. My of...