Click here to Skip to main content
15,888,337 members
Home / Discussions / C#
   

C#

 
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 
AnswerRe: Registering for system power states. Pin
Luc Pattyn25-Oct-10 6:21
sitebuilderLuc Pattyn25-Oct-10 6:21 
QuestionCreate a list for a base class from two list of dervided classes Pin
Mc_Topaz25-Oct-10 2:42
Mc_Topaz25-Oct-10 2:42 
AnswerRe: Create a list for a base class from two list of dervided classes PinPopular
OriginalGriff25-Oct-10 3:13
mveOriginalGriff25-Oct-10 3:13 
GeneralRe: Create a list for a base class from two list of dervided classes Pin
Mc_Topaz25-Oct-10 6:04
Mc_Topaz25-Oct-10 6:04 
GeneralRe: Create a list for a base class from two list of dervided classes Pin
OriginalGriff25-Oct-10 8:36
mveOriginalGriff25-Oct-10 8:36 
QuestionProcessing scanned images. Pin
ameyakoshti24-Oct-10 22:43
ameyakoshti24-Oct-10 22:43 
AnswerMessage Closed Pin
24-Oct-10 23:19
stancrm24-Oct-10 23:19 
GeneralRe: Processing scanned images. Pin
ameyakoshti25-Oct-10 2:07
ameyakoshti25-Oct-10 2:07 
AnswerRe: Processing scanned images. Pin
Keith Barrow25-Oct-10 1:42
professionalKeith Barrow25-Oct-10 1:42 
GeneralRe: Processing scanned images. Pin
ameyakoshti25-Oct-10 21:01
ameyakoshti25-Oct-10 21:01 
AnswerRe: Processing scanned images. PinPopular
OriginalGriff25-Oct-10 2:14
mveOriginalGriff25-Oct-10 2:14 

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.