|
Colin Angus Mackay wrote: You get given a PC with Visual Studio and some common tools on it and a specification.
Do they get access to Google?
|
|
|
|
|
dino2094 wrote: Do they get access to Google?
Yes. 'It is an "open book" test and you have access to the internet so you can use what ever resources are there.'
Although, I should clarify that my company uses WebSense so it won't allow access to bebo, porn or BBC News.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Colin Angus Mackay wrote: porn or BBC News
Similar sites, huh?
|
|
|
|
|
There was an excellent Dilbert cartoon about a week ago that I'd post a link to - but I can't access it.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Every interview I've had asks for an explaination of polymorphism. And almost all interviewers aren't qualified to determine if my answer is "correct" according to what's on the clip board. And I've developed some pretty good answers with so much practice at answering that one.
|
|
|
|
|
Who knows what kind of questions you'll be asked? If you are the interviewee, put the ball back in the interviewer's court by asking questions about the company. This can show the interrviewer than you may have a genuine interest in the company and not just the job you are interviewing for.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi,
I want to access the fileds and change their properties at run time according to different condition. How it is possible? Can anyone do that or have any idea about it.
Thanks
Syed Shahid Hussain
|
|
|
|
|
Are they formula fields? If so you just need to right-click them and hit edit formula..then put insert the formulas in the editor.
|
|
|
|
|
Sorry,
I know that solution but my point of intrest is run time access not at design Time. I want the field at run time. Available to me (in code).
HAVE YOU ANY IDEA ABOUT IT?????
WAITING....
Syed Shahid Hussain
|
|
|
|
|
I developed an Installer using C# set up project. Now when i try to repair it instead of removing it, still it removes the product. what can i do so - when i say it to repair, it will repair the software?
Chayan
|
|
|
|
|
Sorry to ask a new question so soon , I managed to get the xml working now ive got a simple question im sure ive done this before but im getting confused with my actionscript .
so ive got CurrentStatus.InnerText = "Away"; now im just trying to remember how to create a vaeriable like i would in actionscript string i think it is
CurrentStatus.InnerText = Value;
and then value = "away" in the button click events
gah i cant belive ive forgotton this sorry
|
|
|
|
|
That sounds just about right.
-Larantz-
|
|
|
|
|
Hi,
Has anyone written or have found code that creates a Queue(FIFO) and Stack(FILO) class without using System.Collections (1.1) and without using generics(2.0)
Any sample code will be much appreciated.
Thanks
happy coding!
|
|
|
|
|
Why don't you want to use the built-in types? The non-generic collections are implemented in mscorlib.dll, which you cannot build a .NET program without referencing, so in effect they're 'free'. Generic collections are implemented in System.dll, but it's almost impossible not to use some functionality from this assembly, so again it's effectively free.
Both classes are based on arrays, so if you grow the stack or queue beyond the largest size you've previously used you will incur some time cost as it allocates a new array and copies the elements from the old to the new array.
If you just want to study the code for these classes, get the Shared Source version from here[^].
|
|
|
|
|
Mike Dimmick wrote: Why don't you want to use the built-in types?
I imagine he doesn't want to use the built in classes as his homework question started with
"Without using the built in classes...."
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
Once upon a time there was no .NET and people used to create their own data structures
(such as linked lists) in whatever language they preferred or had available.
now there is .NET and a lot of fancy programming languages, and yes you still can
create linked lists: come up with a Node class, and let one Node point to the next
(and maybe also to the previous one); then design a Push() and a Pop() method, et voila
you have either a Queue or a Stack.
Alternatively, create an ArrayList class yourself: use an array, and if an Add() operation
would exceed the array's length, allocate a new and larger one, copy the data and move on.
And then turn that ArrayList into a Stack (it would not serve well in a Queue).
No big deal, no magic involved.
|
|
|
|
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassLibrary1
{
public class bank
{
private int _accno;
private string _acctype;
private int _balance;
private int _amount;
public int accno
{
get
{
return _accno;
}
set
{
_accno = value;
}
}
public string acctype
{
get
{
return _acctype;
}
set
{
if (_acctype = "savings" || _acctype = "current")
{
_acctype = value;
}
else
{
_acctype = "";
}
}
}
public int balance
{
get
{
return _balance;
}
}
public int amount
{
get
{
return _amount;
}
set
{
_amount = value;
}
}
public int credit(_balance , _amount)
{
return _balance + _amount;
}
public int debit(_balance , _amount)
{
return _balance - _amount;
}
}
}
hi
|
|
|
|
|
what error message are you getting? Did you declare the constructor in your class?
happy coding!
|
|
|
|
|
iam getting identifier expected
hi
|
|
|
|
|
OK, Can you do the following:
1. Take out System.Collections for time being
2. Add the default constructor like public Bank(){}.
3. Comment out all your properties get and set methods.
4. Start building the code and start uncommenting each of the properties and then see what error message you get and at what stage , this will enable to to understand the problem better.
Sorry cann't help more than this because don't have IDE in front of me,
Hope you sort out your problem,
happy coding!
|
|
|
|
|
Visual Studio will show numbers at the left of your source lines for you, and the
error messages it generates include file name and line number; look at the first error
you have, go investigate that particular line, (try to) fix it and recompile. Until
everything is OK.
|
|
|
|
|
What are you expecting it to do? What are you getting that you don't think you should? Are you getting some sort of error?
Ben
|
|
|
|
|
Change this part of your code
if (_acctype = "savings" || _acctype = "current")
{
_acctype = value;
}
else
{
_acctype = "";
}
to this
if (_acctype == "savings" || _acctype == "current")
{
_acctype = value;
}
else
{
_acctype = "";
}
-Larantz-
|
|
|
|
|
Just as an aside --
public int credit(_balance , _amount)
{
return _balance + _amount;
}
public int debit(_balance , _amount)
{
return _balance - _amount;
}
These two functions have parameter names that hide the private members - so if you are trying to make the function use your actual balance instead of a balance that is passed in, they should be declared as:
public int credit(_amount){/*code*/}
and
public int debit(_amount){/*code*/}
And if you want the balance to actually be updated, you'll need to do _balance -= _amount; or _balance += _amount;
(this is assuming that you actually do want it to be updated)
|
|
|
|
|
You need to fix your acctype property
public string acctype
{
get { return _acctype; }
set
{
if (value == "savings" || value == "current")
{
_acctype = value;
} else { _acctype = String.Empty; }
}
}
|
|
|
|