ASPFriends.com 'aspngcs' list Archive - April 2002
Messages
Page: 12
data type variant in C# (6 replies, VIP)
ASPFriends.com 'aspngcs' list
is there is data type like varint in c#? can anybody tell me how to cast string to char? Aniruddha Shinde TCS Mangaldas Road 20 Pune 1 020 6122809 430/451 NextPart 000 03D5 01C1D91A.A863E2A0
best way of checking null values (2 replies)
ASPFriends.com 'aspngcs' list
My Code breaks if myDataReader["UnLimitedTime"] contains a null value from the server. How do I apply the correct control for this ? Code: if(myDataReader["UnLimitedTime"] null) { chbUnLimitedTime.Checked false; } else { if(Convert.ToInt64(myDataReader["UnLimitedTime"]) 0) chbUnLimitedTime.Checked false; else chbUnLimitedTime.Checked true; } /Johan
Checking for a null in a type:boolean variable (4 replies)
ASPFriends.com 'aspngcs' list
What is the best way to check for a null value in a type Boolean variable? I am worried that the following code might be ambiguous and letting null values pass through. Is there anything more appropriate? bool myVar; if (!(myVar.Equals(null)) { //do stuff }
Array of NameValueCollections (3 replies)
ASPFriends.com 'aspngcs' list
Why does this not work? NameValueCollection[] nvcTx new NameValueCollection[6]; nvcTx[0].Set("dunning", Params.Dunning.ToString()); nvcTx[0]["dunning"] Params.Dunning; I recive this error: Object reference not set to an instance of an object.
by reference or by value? (2 replies)
ASPFriends.com 'aspngcs' list
Hi, What exactly the following snippet does? class myclass { private SomeObject some new SomeObject(); public SomeObject some { get ( return some; ) } } Will reference to the some be returned or copy of some? /Ivan Belov/
Param Array (3 replies)
ASPFriends.com 'aspngcs' list
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. NextPartTM 000 8846a037 ba1e 4cf2 bb47 054f1b709f81 Content Type: multipart/alternative; boundary " NextPart 001 01C1D9D0.CA4D19C0" NextPart 001 01C1D9D0.CA4D19C0 Content Type: text/plain Anyone found a good way (besides overloading methods) to implement a *lot* o...
Edititing a Event Log Entry (3 replies)
ASPFriends.com 'aspngcs' list
Can anyone think of a way to edit a eventlog entry? I am also wondering if anyone knows how to search a event log other than looping through each entry. thanks
C from C# (10 replies)
ASPFriends.com 'aspngcs' list
I found a third party component that I want to use for an application. The component is a C dll. It came with all the appropriate header files (or whatever it is). I write C# and VB. That's about all I got going for me on this one. Can someone give me some direction on how to go about wrapping this object in a .NET component. 20 Paul
Code to walk a directory tree recursively (9 replies)
ASPFriends.com 'aspngcs' list
Hello, I'm working on a module that needs to build a directory tree from the source directory tree. Along the way I'll make some decisions about whether to display the source files or not. I've started working on the code, using the DirectoryInfo and FileInfo classes, but what I've come up with doesn't seem optimal. Does anyone know of a resourse for walking and recreating a directory tree in C#? ...
Inheriting Constructors? (5 replies)
ASPFriends.com 'aspngcs' list
Hey list, I'm writing a few classes... and the base class has 4 constructors. I have 4 subclasses of this class. When I tried creating an instance of a specific class with one of the parameterized constructors, i get a compiler error saying that "No overload for method ' MySubClass's Constructor ' takes '1' arguments" Do I really have to re declare all 4 constructors for every subclass? Andy Smith...
'unassigned local variable' while setting cookie (3 replies)
ASPFriends.com 'aspngcs' list
When I run the code below I get the following error. What am I doing wrong? Use of unassigned local variable 'MyResponse' //To set HttpResponse MyResponse; HttpCookie cookie; String UserID "foo"; cookie new HttpCookie("UserID"); cookie.Values.Add("UserID", UserID); MyResponse.Cookies.Add(cookie); Thanks, SHaddock
Asp.net using C# (2 replies)
ASPFriends.com 'aspngcs' list
I'm looking for input about the advantages/disadvantages to developing asp.net web forms using C# versus vb.net any thoughts? Also, does anyone have a generic C# wrapper for ado.net using SQLServer7.0 that would be willing to share? Join the world s largest e mail service with MSN Hotmail. http://www.hotmail.com
String.Replace question (4 replies)
ASPFriends.com 'aspngcs' list
Moved from [aspngregexp] to [aspngcs] by devin devinr@drone interactive.com Moved from [aspngcs] to [aspngregexp] by devin devinr@drone interactive.com I am working with a regular expression and the pattern I am looking for had a question mark (?) in it, so I want to replace the "?" with "\?" before I pass it to the RegEx. However, this blows out the String.Replace. example: string FindMe "Hello.a...
string constants (6 replies)
ASPFriends.com 'aspngcs' list
Hi, I need to create a set of string constants. If they were integers I would declare them as ENUM. But I cannot declare ENUM for strings. What is the best way to declare set of string constants to access them in ENUM manner: myVar myStringConstantSet.myStringConstant; ? TIA /Ivan Belov/
How to link to a specific version (2 replies)
ASPFriends.com 'aspngcs' list
Following problem: AssemblySample.dll is installed into the GAC in versions 1.0.0.0 and 2.0.0.0 (culture and assembly name are same across versions). How do I tell csc.exe which one to use? /r doesn't allow for version, culture or pk token information. Chris
NGEN System.xxxxx (6 replies)
ASPFriends.com 'aspngcs' list
Is there a reason the system namespaces shouldnt be NGEN'd into native code? If not, is there an easy way to NGEN them all at once or must we command line them all? Do You Yahoo!? Yahoo! Tax Center online filing with TurboTax http://taxes.yahoo.com/
Question on cookies and the Response object (2 replies)
ASPFriends.com 'aspngcs' list
I am making a method that will write cookies and have found that I need to pass the Response object when calling the method. However, I thought the Pages Response object was global and I could call it from anywhere. Anyway, my question is, if I make a method to write a cookie, do I need to pass the Response object when calling this method? I am incuding sample code below.... I have commented out t...
CType in C# (3 replies)
ASPFriends.com 'aspngcs' list
Hi all, What is the equivalent to CType function in C# ?! Is System.Convert ?! Thanks, Mazen
parameters of a method as objects (3 replies, VIP)
ASPFriends.com 'aspngcs' list
What are the benefits of passing parameters to a method as all objects, rather than the property native data types? Is there extra overhead with passing parameters of a method as objects? Francesco Send and receive Hotmail on your mobile device: http://mobile.msn.com
C# euqivalent for String(x,"123") (5 replies)
ASPFriends.com 'aspngcs' list
I have a piece of C# code, where I need to insert a certain string a few number of times (calculated). In VB I can use String(x, "123") and then if x 3, I get 123123123. Is there a C# equivalent for this, or do I need to concatenate by hand? Michiel van Otegem ASPFriends.com Moderation Team ASPNL.com ASP/ASP.NET/XML Teacher http://www.aspnl.com http://www.aspalliance.com/michiel Teach Yourself XSL...
Strings and byte's (4 replies)
ASPFriends.com 'aspngcs' list
Hey list, What's the easiest/best/right way to go from a String to a byte[] and back again? Andy Smith Chief Code Monkey 20
Streams are confusing (2 replies)
ASPFriends.com 'aspngcs' list
hey list, I've been trying to figure out the cryptography thing today. The following code doesn't do what I expect ( work right :), and I was wondering if anybody could tell me why. This piece of code takes two streams, and a cryptographic transformer. it wraps the output with the transformer, and stuffs the input thru to the output. This code is pretty much ripped from the SDK, but I've modified ...
Directory class (2 replies)
ASPFriends.com 'aspngcs' list
Hello, I have this code in a project: private void BuildDumpStructure(string sDumpPath) { DirectoryInfo oDir new DirectoryInfo(sDumpPath); if (!oDir.Exists) oDir.Create(); } Real simple, but when stepping through in debug mode the BOLD line gives me this error when trying to create a directory on a remote machine/server(using both UNC and Drive Letter reference): COULD NOT FIND A PART OF THE PATH ...
filtering an ArrayList of objects (7 replies)
ASPFriends.com 'aspngcs' list
If I have an ArrayList of objects, how would I quickly pick the correct object from outside of the ArrayList? Let's say there's a property of the objects called CategoryID and I want to find the object in the ArrayList with CategoryID of 24. How easiest to do this? TIA, Francesco Chat with friends online, try MSN Messenger: http://messenger.msn.com
What's the C# equivalent code for this? (2 replies)
ASPFriends.com 'aspngcs' list
This is probably an easy one for the VB programmers out there, but I'm not a VB programmer... All the examples I've seen for generating Crystal Reports have been in VB. I'm trying to create a PDF from a generated r eport. I'm converting some VB.Net code I found on the net to C# and ran across this line of code: myReport.ExportOptions.ExportFormatType 3D CrystalDecisions.[Shared].ExportFormatType.P...
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