microsoft.public.dotnet.framework.clr Archive - March 2003
Post a message to this list
Messages
Page: 12
passing parameters to thread (3 replies)
microsoft.public.dotnet.framework.clr
Could anyone tell how to pass parameters to thread? Thanks.
Setting a property on a inherited class (2 replies)
microsoft.public.dotnet.framework.clr
I can't seem to figure out how to set a propety value on an object that is inheriting a base class (which has the property) using Reflection.Emit. The IL from the code which I disassembled is below: stfld int32 Refinery.Core.Tests.DynamicStuff.DummyClass::ID My Base class has the property defined like so: private int id 1; public int ID { get { return id;} set { id value;} } Now how can I using Re...
Array type from System.Type (2 replies)
microsoft.public.dotnet.framework.clr
I have a System.Type t and I want to get the System.Type which is an array of ts, that is: Type t typeof(int); Type ts /* the thing I want to do */; Debug.Assert(ts typeof(int[])); This works: Array.CreateInstance(t, 0).GetType() But it is not suitable for my purposes, because t is a TypeBuilder and since the type isn't baked, Array.CreateInstance fails with: System.ArgumentException: Type must be...
Problem with sending binary data over socket (2 replies)
microsoft.public.dotnet.framework.clr
When sending data over a socket of type SocketType.Stream. The byte value 255 is converted to 127. Why and how can I solve the problem? Thanks for any advice.
whats wrong with my IL? (2 replies)
microsoft.public.dotnet.framework.clr
I'm generating a dynamic assembly using Reflection.Emit that is identical to a method I have in one of my other classes (written in normal old C# and viewed using ILDASM). The assembly I create dynamically gives me a "Common Language Runtime detected an invalid program" error. The IL is below can anyone help me determine what may be causing the problem? ..method public virtual instance bool Save()...
Dynamic determination of serialized object properties (2 replies)
microsoft.public.dotnet.framework.clr
Beginner's question: I can specify statically at compile time what class properties that are serialized using attributes. I can also do all the work myself by implementing the ISerializable interface and calling info.AddValue("propertyname1", propertyname) info.AddValue("propertyname2", propertyname2) etc in GetObjectData. Q: Is there anything in between these two methods that would let me dynamic...
Global VAriables (2 replies)
microsoft.public.dotnet.framework.clr
I'm not sure if this is the correct location, but I tried the ASP.NET group and have had no success. I posted the following: I have a web application which has extensive parameters based on a user logon. I want to use a global hashtable which all classes can access to retrive values. I currently have a class which creates a public static hashtable and sets the parameters when the user logs in from...
How to use Shared Memory under two domains ? (2 replies)
microsoft.public.dotnet.framework.clr
Hi all, I have a problem linking my shared data to two application domains. The code for the Libray assembly is as shown below using System; namespace SharedLib { public class Lib { public static string data; public Lib(){} public string Alter { get { return data; } set { data value; } } } } The code for the Application 1 is shown below: using System; using Sharedlib; namespace Client { public cla...
Late Binding (2 replies)
microsoft.public.dotnet.framework.clr
How can we create object with Late Binding in Visual Basic DotNet. I know that createobject was used Previously for creating COM component. Can it be used to create Instances of DotNet Assembly, considering the Assembly is stored locally rather than in the Global Assembly Cache. Regards, Irfan
Close() method of EventLog class (4 replies)
microsoft.public.dotnet.framework.clr
Could anybody tell if I need to call myLog.Close() in the following sample code each time after I get myLog.Entries? If I do not call myLog.Close(), will the following code leave handles open on each "machine" and waste "machine" resource? Thanks. ArrayList myLogCollection new ArrayList(); EventLog myLog new EventLog(); foreach (string machine in MachineList) { myLog.MachineName machine; myLog.Log...
System.ExecutionEngineException - what do I do? (2 replies)
microsoft.public.dotnet.framework.clr
I added some more Excel/Interop code to my C# application and no when I try to run it I get a System.ExecutionEngineException, which I can't catch or debug or handle. So what can I do? What would be causing this? I can't even step into my main() method to trace where this is failing.
Execute code from same Assembly in new AppDomain? (3 replies)
microsoft.public.dotnet.framework.clr
Hi, I was wondering if it is possible to execute code from my (currently running) Assembly in another AppDomain. In this new AppDomain I want to do some reflection on other, unrelated assemblies. Then I want to unload the AppDomain and unlock those assemblies. I tried with the following code: [Serializable] class RemoteClass { public void Action() { Console.WriteLine(AppDomain.CurrentDomain.Friend...
System.Math.Tan() and System.Math.Cos() methods (2 replies)
microsoft.public.dotnet.framework.clr
I won't even pretend to be very good at math, but while working with some students on a VB .NET assignment, they discovered that they didn't get the result they expected when they calculated the tangent and cosine of 90 degress using the methods in the System.Math class. From everything we've been able to find, the tangent of 90 should return "undefined" or something similar, and the cosine of 90 ...
Catching an exception during load-time (3 replies)
microsoft.public.dotnet.framework.clr
Hi, Does anyone know how to successfully catch an exception during the time an assembly is being loaded into the runtime? I have two classes A and B. Class A inherits from class B, but class B has an SecurityAction.InheritDemand which is checked at load time. So when I try to create an instance of A, the runtime loads the assembly with class B and performs the security check. I tried using a try/c...
XmlSerializer & Whitepsace (3 replies)
microsoft.public.dotnet.framework.clr
How do I prevent the XmlSerializer from translating a XML Element containing a white space into an empty element when deserializing a class instance.. e.g XML is : ?xml version "1.0"? Names xmlns:xsd "http://www.w3.org/2001/XMLSchema" xmlns:xsi "http://www.w3.org/2001/XMLSchema instance" FirstName Ollie /FirstName SecondName /SecondName /Names Class definition is : [Serializable] public class Name...
DataSet XML (2 replies)
microsoft.public.dotnet.framework.clr
I have got a DataSet that contains three tables Customer, Order and OrderDetails with all the relationship defined in the dataset. As we all know the XML view of the Dataset is not hierarchia (atlease by Default). How can i display the Hierarchial XML from the Dataset? Is this something to do with changing XML Schema Programmatically...? If yes then how can I do this either? can any one give me so...
Calling into C DLL : passing char buffer (3 replies)
microsoft.public.dotnet.framework.clr
Hello group, I'm writing a C# class that calls into a C style DLL. I'm trying to call a function which takes a uint pointer and a char buffer pointer. I can debug the C DLL and the pointers look OK, but the C# class throws an exception: System.Runtime.InteropServices.MarshalDirectiveException: Can not marshal parameter #3: Ansi char arrays can not be marshaled as byref or as an unmanaged to manage...
Determine Runtime Host? (4 replies)
microsoft.public.dotnet.framework.clr
Hello, How can I determine if my code is hosted by the standard shell runtime host, or another one? Thanks, Michael
Method reference from MethodInfo (3 replies)
microsoft.public.dotnet.framework.clr
I'm trying to create an object with a constructor that only accepts a method name ("new EventHandler(void(object, System.EventArgs) target)"). I have an object instance and a MethodInfo object that I want to use together to reference this method. How to I take that object instance and MethodInfo object and pass it into the constructor? Thanks, Jon
Persisting a dynamic assembly (4 replies)
microsoft.public.dotnet.framework.clr
I have a requirement to build a dynamic assembly using Relection.Emit. The assembly will be used in a .NET VSA scripting host to provide a global object context for the script. The assembly that is being constructed will be quite big and I would rather not run the code that emits it each time I need to use it. So, my question is: Is there a way of persisting the IL contained in a dynamic assembly ...
Don't have permissions to write to event log (2 replies)
microsoft.public.dotnet.framework.clr
I'm trying to write to the Application log on my local machine, when I call EventLog::WriteEntry a caught a exception saying "Requested registry access is not allowed." . Theres' any easy way to set the ASPNET user to have permissions to write to the log, or I must change the processModel userName to run under thew SYSTEM user :(. Thanks in advance, José Tavares
Loading the private key from an snk file. (2 replies)
microsoft.public.dotnet.framework.clr
Is there anyway to load the contents of a *.snk file into an RSA class of some sort so that I can use the private key to sign some other data? The StrongNameKeyPair class doesn't allow acccess. Cheers Chris
Does System.Collections.Specialized Box Values? (3 replies)
microsoft.public.dotnet.framework.clr
I have a question about the StringCollection, StringDictionary, and NameValueCollection collections contained in the System.Collections.Specialized namespace. Do these specialized collections derive form System.Collections.CollectionBase and therefore take the typical performance hit of boxing a value type to an object, or are they written in such a way as to avoid this performance penalty? It see...
Difference with Asynchronous and Multithreading? (10 replies)
microsoft.public.dotnet.framework.clr
Does anybody can explain what is the difference between asynchronous programming and multithreading programming? when do i have to implement multhreaded and when to implement asynchronous?
Socket.Receive not receiving problem. (3 replies)
microsoft.public.dotnet.framework.clr
Hi, I've got a Socket.Receive problem when receiving from some web servers using HTTP 1.1. Sending the GET request header and getting the correct response works fine with HTTP 1.0 but not with some servers when using HTTP 1.1 with this some servers work fine and with some Receive never gets the data. I have verified by using a packet capture utility (WinDump tcpdump for Windows) that the correct r...
Ad
Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification