|
LongRange.Shooter wrote: in a recent technology testing I took I rated in the top 5% internationally as a C# coder.
So was it an easy test then?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
No it was the Robert Half test, locally most got only 75% and internationally the average was 79% while I scored 92%.
|
|
|
|
|
Oh, I see. I've looked Robert Half up now, I didn't realise they were a recruitment agency, I thought they were a just a certification company, like say CompuTeach here in the UK.
Obviously their tests will carry a lot of weight in the development community
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Let me get this staight...someone who is a site MVP and appears to be much more experienced than you told you that your code was not good. Yeah, he could have said it better, but calling him names is going to get you ignored permanently.
LongRange.Shooter wrote: in a recent technology testing I took I rated in the top 5% internationally as a C# coder.
Don't make claims like this unless you can prove it.
|
|
|
|
|
Well, first of all I don't care who or what he is. He could answer the question or shut up. He did not answer the question nor did he behave in a fashion I'd expect of a site MVP. Secondly, his comment was one of a smartass not someone being helpful. Finally, my claim can be backed up by anyone that has access to the Robert Half testing scores...the results showed that locally here the average score was 72 and internationally it was 79 while I score 93.
As to more experience....I've not seen anything that indicates he has more experience than me, especially since I've been writing code for 30 years and he's only been at it 15 years. I was also in a group that was part of the C# early adapters program and was working with Microsoft in finalizing the language within Visual Studio. Being a site MVP just means he either has no job or no life so he can jump in and answer a ton of questions before anyone else. I've been on this site for many years, been help to many people and I always try to provide help and not criticism, except where some constructive criticism can be of help.
Finally with the exception of the use of the various literals in beta code, there is nothing wrong with my code that I can see. And if there was indeed a major issue with how I wrote the code I'd love to have some one point out what it is.
|
|
|
|
|
LongRange.Shooter wrote: I have a service that launches multiple threads. Each thread has a unique purpose and thus they are unique sources. I have a successfully created log file named OneSource and I want all of the sources logging events to that log file.
A possibility exists: Is this service running under the LocalSystem account?? If so, it doesn't have the permissions to execute the EventLog.SourceExists method and will throw a SecurityException. Sources should be created by the service installer, not the service itself.
|
|
|
|
|
Hi Dave.
I'm not getting any exceptions during the process execution. But I am running under LocalSystem. I have security set to LinkDemand inheriting the rights from the service, and the service (for now) Asserts SecurityPermission. We are still in development and (as pointed out) we have a constantly changing environment at the moment. In fact we may be looking at yet another log file change in a few months just because the owning company is going to change the company name and they don't want a log file with the old name.
Thanks.
|
|
|
|
|
LongRange.Shooter wrote: I'm not getting any exceptions during the process execution.
Since it's a service that runs under a different desktop you won't see any exceptions. The reason it will fail is because that method call digs into the registry to get the information, and the bulk of the registry is off-limits to the LocalSystem account.
|
|
|
|
|
I have function I need to call from an legacy dll. The first parameter I need to pass is a pointer to a structure which contains pointers to another structure. I tried everythiing I could find on the internet and nothing has solve this issue. following are the structure:
[StructLayout(LayoutKind.Sequential,Pack = 4)]
unsafe public struct s_ci
{
public String value;
public ushort ci;
public ulong num_valid;
public ulong num_blank;
public ulong num_invalid;
public ulong num_zero;
public ulong num_alpha;
public ulong num_other;
public double total;
public ushort maxsiz;
};
[StructLayout(LayoutKind.Sequential, Pack = 4)]
unsafe public struct Name_Struct
{
[MarshalAs(UnmanagedType.LPStruct, SizeConst = 4)]
public s_ci p_npnf;
[MarshalAs(UnmanagedType.LPStruct, SizeConst = 4)]
public s_ci p_npnt;
[MarshalAs(UnmanagedType.LPStruct, SizeConst = 4)]
public s_ci p_npfn;
[MarshalAs(UnmanagedType.LPStruct, SizeConst = 4)]
public s_ci p_npmn;
[MarshalAs(UnmanagedType.LPStruct, SizeConst = 4)]
public s_ci p_npln;
};
public static extern long Evaluate_Formatted_Name([In,Out]ref Name_Struct primary,
[In,Out]ref Mask p_mask,
int last_first, UInt32 handle);
public long ProcessRfmtName(string fname, UInt32 handle)
{
long rc = 0;
//create name structure
Name_Struct p_name = new Name_Struct();
p_name.p_npnf.value = fname.ToString();
Mask p_mask = new Mask();
rc = RFMT_NAME.Evaluate_Formatted_Name(ref p_name, ref p_mask, 1, handle);
return rc;
|
|
|
|
|
LouMattera wrote: The first parameter I need to pass is a pointer to a structure which contains pointers to another structure. I tried everythiing I could find on the internet and nothing has solve this issue.
Did you try creating a managed class that wraps the function using C++/CLI so you can use the native structures?
led mike
|
|
|
|
|
No I have not. What I understand is you want me to write a managed dll in c++ to bridge to the unmanaged c dll.
|
|
|
|
|
LouMattera wrote: you want me to write a managed dll in c++ to bridge to the unmanaged c dll.
I don't want you to do anything, I was just asking a question. Since I have used C++ for many years I find using PInvoke from C# rather than using C++ to interop with C like trying to put a square peg in a round hole.
led mike
|
|
|
|
|
I agree, I am going a little crazy trying to make this work in c#. If I write a c++ wrapper would I define the structure as a class ? I beleive you can pass a class as a pointer to a managed c++ dll. Then the c++ dll would call the unmanged function in the legacy dll.
|
|
|
|
|
I have a datatable which is having n no. of rows and each row has a unique field say ID.
Now I want to get a particular row for a specified ID.
eg. there are 5 rows in a datatable and the id's are
1,2,3,4 and 5 and if I want to select a row having ID = 4
What will be the code snippet for that?
Does anybody have any idea?
Thanks in advance,
|
|
|
|
|
|
DataRow row = dataTable.Select( "ID = 5" );
|
|
|
|
|
Actually what I m trying to do is I m firing a query in SQL Server 2005 to retrieve records for selected criteria.
Based on the selection the query result I m taking that in a datatable and I have a GridView where this list of results is displayed.
Now there is a hyperlink in the Grid to select the detailed information about a particular result.
eg. In the query result I get 5 records matching the selection criteria, which are stored in a datatable.
now these reults are displayed in the grid and when i click on the hyperlink of a particular row then the records of that row should get selected and the detailed info should get displayed in another page.
For this particular row selection I want a row from the datatable.
|
|
|
|
|
Hello everyone,
I want to convert an object instance to XML string, and later read the XML string to construct the object again. Any samples?
(I find some serialization samples, but all about binary format, I prefer to use XML format.)
thanks in advance,
George
|
|
|
|
|
XmlSerializer[^]
Basically the same as binary serialization but to/from xml as requested.
|
|
|
|
|
Cool, J4amieC!
This is what I am looking for.
regards,
George
|
|
|
|
|
We have an application that polls active directory for a list of e-mail accounts. Until recently, all accounts were housed in Exchange. Recently, a merger with another company has introducted Lotus Notes into the mix.
Can anyone assist me in determining whether an e-mail account is defined in Exchange or defined in Lotus Notes programmatically?
From my perspective, all data is being retrieved via the Exchange server, but, all users, regardless of system of origin, show up in the global address list. As well, users have the same OU values.
Thanks in advance for any help provided.
Tim
P.S. - And, yes, I have searched forums, arcticles, MSDN, and Google.
modified on Wednesday, May 7, 2008 9:36 AM
|
|
|
|
|
Does both Exchange and Lotus Notes using Same AD ?
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
Hi,
I want to generate some automated code when I implement an interface in a class.
For example if I have an interface i.e.
using System;
using System.Collections.Generic;
using System.Text;
namespace Foo
{
public interface IFoo
{
bool DoSomething();
}
}
Now what I want to do is when I implement the interface in a class normally it defines the method in the class. I want to extend this so that I can have some automated code in the defined method as well. Please help me and guide me how to do this.
Regards;
Uttam Kumar
|
|
|
|
|
You cannot do what you are thinking of. There are other options...
1. You could change the class from a type interface to a type class and make the function a public virutal method so that any base classes can have the option of overriding that function.
2. You could create code snippets so that when you type something code (like: dosomething) then the code you want is automatically placed into the file for you.
Chris
|
|
|
|
|
Thanks for quick reply. Is it not even possible to write some commented code or some sort of comment?
Regards;
Uttam Kumar
|
|
|
|