Click here to Skip to main content
15,899,313 members
Home / Discussions / C#
   

C#

 
AnswerRe: datetime problem Pin
Ennis Ray Lynch, Jr.25-Oct-10 10:10
Ennis Ray Lynch, Jr.25-Oct-10 10:10 
GeneralRe: datetime problem Pin
Dhyanga25-Oct-10 10:13
Dhyanga25-Oct-10 10:13 
AnswerRe: datetime problem Pin
Luc Pattyn25-Oct-10 10:22
sitebuilderLuc Pattyn25-Oct-10 10:22 
AnswerRe: datetime problem Pin
Dhyanga25-Oct-10 10:32
Dhyanga25-Oct-10 10:32 
GeneralRe: datetime problem Pin
Pete O'Hanlon25-Oct-10 10:37
mvePete O'Hanlon25-Oct-10 10:37 
GeneralRe: datetime problem Pin
Dhyanga25-Oct-10 10:42
Dhyanga25-Oct-10 10:42 
GeneralRe: datetime problem Pin
Pete O'Hanlon25-Oct-10 10:47
mvePete O'Hanlon25-Oct-10 10:47 
AnswerRe: datetime problem Pin
sc_ad25-Oct-10 16:27
sc_ad25-Oct-10 16:27 
AnswerRe: datetime problem Pin
V.25-Oct-10 21:02
professionalV.25-Oct-10 21:02 
QuestionT[,] can't be cast to object[,] ? Why not? [solved] Pin
Matthew Klein25-Oct-10 9:32
Matthew Klein25-Oct-10 9:32 
AnswerRe: T[,] can't be cast to object[,] ? Why not? Pin
Nish Nishant25-Oct-10 10:00
sitebuilderNish Nishant25-Oct-10 10:00 
GeneralRe: T[,] can't be cast to object[,] ? Why not? Pin
TheyCallMeMrJames25-Oct-10 10:11
TheyCallMeMrJames25-Oct-10 10:11 
GeneralRe: T[,] can't be cast to object[,] ? Why not? Pin
Nish Nishant25-Oct-10 10:23
sitebuilderNish Nishant25-Oct-10 10:23 
GeneralRe: T[,] can't be cast to object[,] ? Why not? Pin
TheyCallMeMrJames25-Oct-10 10:41
TheyCallMeMrJames25-Oct-10 10:41 
GeneralRe: T[,] can't be cast to object[,] ? Why not? Pin
Matthew Klein25-Oct-10 10:17
Matthew Klein25-Oct-10 10:17 
QuestionDynamically Load Referenced Assembly Pin
Adam R Harris25-Oct-10 6:32
Adam R Harris25-Oct-10 6:32 
AnswerRe: Dynamically Load Referenced Assembly Pin
Nish Nishant25-Oct-10 6:48
sitebuilderNish Nishant25-Oct-10 6:48 
GeneralRe: Dynamically Load Referenced Assembly Pin
Adam R Harris25-Oct-10 6:53
Adam R Harris25-Oct-10 6:53 
AnswerRe: Dynamically Load Referenced Assembly Pin
Ennis Ray Lynch, Jr.25-Oct-10 7:17
Ennis Ray Lynch, Jr.25-Oct-10 7:17 
Register the Assembly Resolve event before starting your applications message pump, or in the case of an ASP.NET application in the Application_Start event. Other than that, post a specific issue. I have never had a problem using Assembly resolve; it is fairly straight forward. Here is a copy and paste from another project with some namespaces removed.

using System;
using System.Data;
using System.Configuration;
using System.Reflection;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace _Website {
	public class AssemblyResolver {


		private bool mLoading = false;

		public AssemblyResolver(AppDomain appDomain) {
			appDomain.AssemblyResolve += new ResolveEventHandler(OnAssemblyResolve);
		}

		/**
		 * <summary>
		 * This method will attempt to result assemblies
		 * </summary>
		 */
		private Assembly OnAssemblyResolve(object sender, ResolveEventArgs args) {
			Assembly result = null;
			//Prevent Stack overflow, this method will recurse without this line
			if(!mLoading) {
				try {
					mLoading = true;
					IServiceBroker broker = ServiceRequests.CommonRequests.GetBroker();
					byte[] assembly = broker.ResolveAssembly();
					result = Assembly.Load(assembly);
				}//end try
				//catch(Exception e1) {
				//	e1 = e1;  //Used for debugging
				//}
				finally {
					mLoading = false;
				}
			}//end mLoading
			return result;
		}
	}
}


Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS.

"And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

GeneralRe: Dynamically Load Referenced Assembly Pin
Adam R Harris25-Oct-10 7:57
Adam R Harris25-Oct-10 7:57 
QuestionHttpWebRequest/Response in a Duplex way? Pin
softwarejaeger25-Oct-10 3:37
softwarejaeger25-Oct-10 3:37 
AnswerRe: HttpWebRequest/Response in a Duplex way? Pin
Adam R Harris25-Oct-10 6:38
Adam R Harris25-Oct-10 6:38 
AnswerRe: HttpWebRequest/Response in a Duplex way? Pin
TheyCallMeMrJames25-Oct-10 9:56
TheyCallMeMrJames25-Oct-10 9:56 
QuestionRegistering for system power states. Pin
HalliHaida25-Oct-10 3:18
HalliHaida25-Oct-10 3:18 
AnswerRe: Registering for system power states. Pin
_Erik_25-Oct-10 5:35
_Erik_25-Oct-10 5:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.