473,408 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

.Properties or .Invoke in VB.NET?

I'm creating a new user account in AD an have come across what seems to be
two methods to set the user account properties.

The simpler way:
NewUser.Properties("sAMAccountName").Add("sam.acco unt")
NewUser.CommitChanges()

The other way:
NewUser.Invoke("Put", New Object() {"sAMAccountName", "sam.account"})
NewUser.CommitChanges()

Is one way better than the other?
Thanks!
Jul 21 '05 #1
0 1103

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eric | last post by:
Hello, I'm using an ActiveX component in my .NET application bij referencing the DLL. Visual Studio will create a wrapper class. So far so good. The problem is that i've not all properties...
10
by: Sunny | last post by:
Hi, I have an old problem which I couldn't solve so far. Now I have found a post in that group that gave me an idea, but I can not fully understand it. The problem is: I'm trying to use a...
6
by: JerryP | last post by:
Hello, is there a way to launch the property dialogue for a directory from my c# app ? I would also like to launch the User Account Properties from Active Directory Users and Computers, and the...
3
by: wang.qiang | last post by:
I can't list the key-value pairs at runtime.The pairs list can not be retrieved. below is what I wrote DirectoryEntry nodeAdmin = de.Children.Find("IISAdmin","IIsWebVirtualDir") // ...
11
by: JPRoot | last post by:
Hi I wish to set/get a property using System.ComponentModel.ISynchronizeInvoke.Invoke but I cannot find the exact syntax.. Any clue how to do this (right now I am making GetEnabled/SetEnabled...
3
by: CodeToad | last post by:
I am using the Windows MCAD/MCSD book on VB.NET/VC.NET to refresh myself on some C# concepts and I ran into one issue in the properties area I just do not understand. In VB.NET this is easy to...
0
by: Michael | last post by:
I'm creating a new user account in AD an have come across what seems to be two methods to set the user account properties. The simpler way:...
0
by: nelis | last post by:
Anyone ever ran into the issue of adding custom properties to a user? Here's a code snippet i wrote: DirectoryEntry newUser = deContainer.Children.Add("CN=" + username, "User");...
1
by: =?Utf-8?B?VGVlcmF2ZWU=?= | last post by:
I try to invoke Connection Properties dialog box that Visual Studio 2005 use. The dialog that I said is used in many places such as when developers build connection string in Settings.setting file...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.