Click here to Skip to main content
15,911,896 members
Home / Discussions / C#
   

C#

 
GeneralRe: datetime problem Pin
Pete O'Hanlon25-Oct-10 10:04
mvePete O'Hanlon25-Oct-10 10:04 
GeneralRe: datetime problem Pin
Dhyanga25-Oct-10 10:11
Dhyanga25-Oct-10 10:11 
AnswerRe: datetime problem Pin
TheyCallMeMrJames25-Oct-10 9:52
TheyCallMeMrJames25-Oct-10 9:52 
GeneralRe: datetime problem Pin
Dhyanga25-Oct-10 9:57
Dhyanga25-Oct-10 9:57 
AnswerRe: datetime problem Pin
Nish Nishant25-Oct-10 10:07
sitebuilderNish Nishant25-Oct-10 10:07 
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 

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.